Any restrictions on reading files in the StorageDirectory when using Postgres with "EnableStorage" : false ?,

This may be a little out of scope, but I’m exploring using a Dropbox Business account to keep long-term archives of the StorageDirectory in the Cloud.

There is a Dropbox package for use on UBUNTU, and that seems to work. A minor drawback is that the files to sync with the cloud have to be in the Team Dropbox folder, but that does work as long as the StorageDirectory path is set to that folder… Dropbox can be configured to sync on demand rather than automatically also.

Just wondering if there would be some problem with locking files in the StorageDirectory if Orthanc and Dropbox are accessing the same files at the same time. It would be a mostly one-way operation as far as the Dropbox app is concerned. Backup of the Postgres database file would be performed using a CRON job and and a .sh script, probably at some wee hour of the morning. Sounds like that can be done even while Postgres and Orthanc are still running ?

Thanks.

I can’t personally endorse such a setup, as I can’t envision how the Dropbox synchronization agent can interfere with Orthanc. Obviously, using Dropbox to store the SQLite database of Orthanc will inevitably lead to data corruption.

Use the cloud storage plugins instead:
https://book.orthanc-server.com/plugins/object-storage.html

Thanks. We are still in a dev environment, so I might just try Dropbox using Postgres for the Database and the Filesystem for the files. You can actually turn off Dropbox and just run it on demand during maintenance by a CRON job. Trying to compile the AWS plug-in for OS X so I can play around with S3 storage also on a free account with AWS.

I take it that the S3 plug-in stores the image files in the Cloud, but the DB can be on Postgres locally, so the image files have to be accessed every time they are read ? I would prefer to use something like S3 glacier to just store them for Archival purposes and then have the files available on a local server for real time use. That is sort of what Dropbox would do. The Cloud would be just for a disaster recovery.

I was able to compile the libOrthancAwsS3Storage.mainline.dylib plug-in after monkeying around with my OS X system.

Change to some directory, I use orthanc_sources because that is where all of my sources are:

The directions will be different for LINUX. See the orthanc-object-storage/README.md

  1. COMPILE THE SDK:

cd orthanc_sources
git clone https://github.com/aws/aws-sdk-cpp.git (put the SDK in aws-sdk-cpp).
cd aws-sdk-cpp
mkdir -p builds/aws-sdk-cpp (p creates if not exists)
cd builds/aws-sdk-cpp
cmake -DBUILD_ONLY=“s3;transfer” …/…/
make -j 4
make install

  1. Install: https://github.com/Microsoft/vcpkg

(Need brew install gcc && brew install jsoncpp package on OS X), but actually was unable to get it to use the brew jsoncpp package (see below, Static Build works)

Change back to ‘orthanc_sources’ and:

git clone https://github.com/microsoft/vcpkg (into the orthanc sources dir)
./vcpkg/bootstrap-vcpkg.sh (should build after brew install gcc on OS X)
cd vcpkg
./vcpkg install cryptopp

  1. Get the sources for the plug-in (cd back to orthanc_sources)

hg clone https://hg.orthanc-server.com/orthanc-object-storage
cd orthanc-object-storage
mkdir -p build/aws
cd build/aws
(It originally threw an error with -JSONPP, so that probably is not need with -DSTATIC_BUILD=ON)
cmake -DSTATIC_BUILD=ON -JSONCPP_INCLUDE_DIR=/usr/local/Cellar/jsoncpp/1.9.4_1/include/ -DUSE_SYSTEM_GOOGLE_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=…/…/…/vcpkg/scripts/buildsystems/vcpkg.cmake …/…/Aws
make -j 4

(libOrthancAwsS3Storage.mainline.dylib and the symlink will be in the build directory)