Automatically forwarding received DICOMs

Current Scenario:

1 - ORTHANC hosted on a Windows server in AWS EC2
Local storage
Index in PostgreSql
Modality configured for server 2 (Manual sending is working normally using the “Send to DICOM modality” button in Orthanc explorer)

2 - ORTHANC hosted on a Linux server in AWS EC2
Local storage (Using s3fs to synchronize with our s3 bucket)
Index in PostgreSql

Server 2 is a new test server and I already have clients using server 1.
I would like to know how I can automate the sending of received DICOMs from server 1 to server 2, without changing the operation of server 1.
So that the received DICOMs are stored on both servers.

As stated above, I can already send the DICOM stored on server 1 to server 2 using the configured modality.
My desire is to automate this forwarding proccess.

any suggestions?

You probably want to use a Lua Script. There are some examples in the Orthanc Book:

https://book.orthanc-server.com/users/lua.html?highlight=lua%20scripting#auto-routing-of-dicom-images

although if you want to keep the original on server 1, you will not want to delete it.

There are some additional Lua script samples here: https://bitbucket.org/osimis/orthanc-setup-samples/src/master/lua-samples/

Stephen D. Scotti, M.D.

I am just getting up to speed here and was attempting to build exactly as you describe

“2 - ORTHANC hosted on a Linux server in AWS EC2” with the s3 bucket

I have mounted the s3 bucket to the server but could you tell me how you went about syncing it?
rsync or ?? and what directory’s.