mirror orthanc server

Is there a way to continual mirroring orthanc server in another orthanc instance for backup purposes?, something like autorouting example in lua script but without deleting, keeping the initial study in both initial and rooting orthanc server instance.

many thanks,

kyriakos

Hello,

This is the goal of the sample script “Replicate.py”:
https://book.orthanc-server.com/users/replication.html#generic-replication

Note that this is a sample script, and that there are many possibilities for optimizing it.

Sébastien-

Hello,
The senario i was thinking was a server that is receiving 20-30 new studies every day, and we want to forward them to another “backup” server keeping the original, doing something like incremental backup.
I thought that replicate.py is like doing a full backup.

Στις Κυριακή, 26 Σεπτεμβρίου 2021 στις 10:43:00 π.μ. UTC+3, ο χρήστης s.jo...@gmail.com έγραψε:

Hi,

Then, you can just declare your backup orthanc as another modality and forward every received instance to it.

This can be done with a one line lua-script based on https://book.orthanc-server.com/users/lua.html#auto-routing-of-dicom-images

function OnStoredInstance(instanceId, tags, metadata)
SendToModality(instanceId, ‘backup’)
end

If you also wish to replicate the deletions, you can just implement the OnDeletedInstance callback and call the Rest API of the backup Orthanc to remove the instance from there as well.

HTH

Alain