Sync betweed to Orthanc instances or peer

Greetings to all

I desperately need some advice re the ability to sync two ORTHANC instances. I previously have come across the discussion in regards to this but cannot find it

Could some one please provide some guidance. ?
[

Thank you in advance.

Onn

P/S I have been using Orthanc for the last 2 years and have to admit it has been functioning without glitch . But really need to have two orthanc instance in sync

Hello,

I desperately need some advice re the ability to sync two ORTHANC
instances. I previously have come across the discussion in regards to
this but cannot find it

A simple and stateless approach should be possible by leveraging the
OnStableStudy Lua callback.

http://book.orthanc-server.com/users/lua.html

In it, you would: use the HttpGet function to access the "studies"
resource of the remote Orthanc server and check if the study is already
present there based on its unique identifier. You could also issue a
DICOM C-FIND via a RestApiPost call on the modalities resource.

As an optional tweak, if you were to use the OnStoredInstance callback,
you would also have access to information about the origin of the data.
This data would allow you to avoid unnecessary requests when receiving
data from the remote server, since you'd know it already has it. The
trade-off is that you'd need to make more requests otherwise or keep
state.

http://book.orthanc-server.com/users/lua.html#origin-of-the-instances

If the data isn't present in the remote server, you would then use the
SendToPeer function to transfer it via the remote Orthanc HTTP API.
Alternatively, you can use the RestApiPost function to issue a transfer
request to the remote Orthanc server via the modalities resource for a
DICOM transfer (also see the SendToModality function), or via the
DICOMweb plugin for a STOW-RS transfer.

Undoubtedly there are other approaches, possibly more robust, stateful
or not. For example, I suggest you take a look at the "changes" HTTP
resource of Orthanc when considering your requirements. Among other
things, it allows you do drive Orthanc to do all of this with the
language and tools of your choice.

Hello,

Have you checked the “Replicate.py” sample Python script that is part of the Orthanc distribution?
https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/Replicate.py

It is nice to know that Orthanc has been useful to you for the last two years :slight_smile:

Regards,
Sébastien-