move studies from 1st orthanc to 2nd

Hi all!

Tell me please best way to move studies from “branch” orthanc to “central”
Both servers have a vpn tunnel connection each other.

Thanks.

There may be a better way to accomplish this, but I would probably write a script to use the rest API to push studies from one orthanc to the next, assuming they’re setup as orthanc peers; and log the successful transfers so as to be able to skip those if the process gets interrupted.

https://book.orthanc-server.com/users/rest.html

some pseudo-code

for study in rest_query_studies
if [ result not in already_pushed ]
result = rest_push study to peer
if [ result == successful ]
log successful study > already_pushed
fi
fi
done

typo in the pseudo-code. fixed

for study in rest_query_studies
if [ study not in already_pushed ]
result = rest_push study to peer
if [ result == successful ]
log successful study > already_pushed
fi
fi
done

Hello,

In complement to Alex’s answer, you could achieve this using the so-called “replication” mechanism, which is explained in the Orthanc Book:
https://book.orthanc-server.com/users/replication.html

Regards,
Sébastien-