Transfere Studies from orthanc to new orthanc

I have an original server that contains hundreds of studies and I would like to transfer these studies to the new server, but I noticed that the process of adding studies to the new server from the old one requires uploading each file one by one, how can I transfer all the folders at once?

In the following pictures, the studies folders

1.PNG2.PNG

You are looking for the “Replicate.py” script that is part of the Orthanc source distribution:
https://book.orthanc-server.com/users/replication.html#generic-replication

I could not apply the method? Any more explanation?

في السبت، 29 يناير 2022 في تمام الساعة 7:17:05 م UTC+2، كتب s.jo...@gmail.com رسالة نصها:

Hi I take the chance of this topic to share a slightly modified version of replicate.py

Replicate.py works well but it had one problem : it’s not resumable. So if the scripts shutdown the replicate.py will restart importing image from zero.

So I modified the replicate.py to call the /instance API of both server and compute the missing instances to send. So in case of failure the new start will send only the missing instance.

This script has one downside, the instance list has to be stored in memory and may lead to a high memory usage in case of very huge orthanc server.
I tested this script with 2.1 millions of instance with no problem.

I think it should fit for at least 10M instance (or more).

However for very large server we will have to play with the since query tag on the instance api or use the /series level (and compare number of instance for each series)

Best regards,

Salim

Replicate.py (3.7 KB)

Thank You

But how i can run “Replicate.py” file ?

في الأحد، 30 يناير 2022 في تمام الساعة 6:42:36 م UTC+2، كتب salim....@gmail.com رسالة نصها:

Python

Στις Κυρ, 30 Ιαν 2022, 19:21 ο χρήστης Fady Qudaih <fadyzu@gmail.com> έγραψε: