How to upgrade orthanc server

1,648 views
Skip to first unread message

qing.f...@gmail.com

unread,
Nov 23, 2016, 2:08:31 PM11/23/16
to Orthanc Users
I am using Window 10 and installed Orthanc 0.8. Now I wanted to install Orthanc 1.1, but it looks like I have to uninstall version 0.8 first. That means I will loose all my data. Is there a way I can upgrade Orthanc server version and keep my data? Thanks a lot

Qing

Sébastien Jodogne

unread,
Nov 24, 2016, 3:20:44 AM11/24/16
to Orthanc Users, qing.f...@gmail.com
Hello,

The upgrade procedure is explained in the Orthanc Book:

Sébastien-

Sreyroat Seng

unread,
Dec 1, 2016, 6:34:05 PM12/1/16
to Orthanc Users, qing.f...@gmail.com
Hello,

How does the upgrade instructions on the page applies to Orthanc Docker? That is to say, how would one make use of "--upgrade command-line option" as it relate to Orthanc Docker?
It would be great if there is an expanded upgrade process for Orthanc Docker available.

Thanks!!
Srey Seng

Qing Feng

unread,
Dec 1, 2016, 6:39:53 PM12/1/16
to Sreyroat Seng, Orthanc Users
Thanks for your reply. I actually read the link of replication and backup. I still have no clue how to upgrade. I am using window version without any plugins.  Seems like my only option is to uninstall version 0.8 and then install verision 1.1. But I will loose all my existing data if I do so. I know I can download all data and then import all back after new installation. I am looking for the better way.  Thanks,

Qing

This email and its attachments may contain privileged and confidential information and/or protected health information (PHI) intended solely for the use of ZOOM+ and the recipient(s) named above.  If you are not the recipient, or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, dissemination, distribution, printing or copying of this email message and/or any attachments is strictly prohibited.  If you have received this transmission in error, please notify ZOOM+ immediately at 1-844-ZOOM-777 and permanently delete this email and any attachments.

Sébastien Jodogne

unread,
Dec 3, 2016, 5:19:09 AM12/3/16
to Orthanc Users, ss...@zoomcare.com, qing.f...@gmail.com
Hello,
 
Thanks for your reply. I actually read the link of replication and backup. I still have no clue how to upgrade. I am using window version without any plugins.  Seems like my only option is to uninstall version 0.8 and then install verision 1.1. But I will loose all my existing data if I do so. I know I can download all data and then import all back after new installation. I am looking for the better way.  Thanks,

In general, upgrading the database version simply consists in adding the "--upgrade" flag when starting Orthanc. Orthanc warns you about this flag in its log. This is also written in the Orthanc Book:

If "--upgrade" is insufficient for you, please could you explain why the "Replication procedure with direct access to the filesystem", as described in the Orthanc Book, does not work for you?

You just have to:
  1. Stop your old Orthanc 0.8.x.
  2. Move its storage folder elsewhere (say,in "OrthancStorage-0.8").
  3. Start the new Orthanc 1.1.0.
  4. Invoke the replication script to re-import all the DICOM files from Orthanc 0.8, as in: Resources/Samples/ImportDicomFiles/ImportDicomFiles.py localhost 8042 ./OrthancStorage-0.8

How does the upgrade instructions on the page applies to Orthanc Docker? That is to say, how would one make use of "--upgrade command-line option" as it relate to Orthanc Docker?
It would be great if there is an expanded upgrade process for Orthanc Docker available.

Please follow the instructions about making the Docker database persistent:

Afterwards, the "--upgrade" command flag can be used, exactly as if Orthanc were run natively outside Docker. Here is a sample session:

# sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:0.9.4
# sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.1.0 /etc/orthanc --upgrade

Sébastien-

Sreyroat Seng

unread,
Dec 4, 2016, 3:01:25 PM12/4/16
to Orthanc Users, ss...@zoomcare.com
Hello,

Thank you for clarifying! I am continuing to learn more about Orthanc and currently trying to understand the upgrade process in more depth.

In the sample commands provided, there is the "old" Orthanc docker command to start [..] jodogne/orthanc:0.9.4, followed by the "new" Orthanc docker command [..] jodogne/orthanc:1.1.0 /etc/orthanc --upgrade. Does this mean you need to have the "old" version running, and then run the "new" version with the upgrade option?

Additionally, the sample commands provided are using the default SQLite back-end. In the Database versioning section, there seems to be references to SQLlight back-end only. What about when using the PostgreSQL plugin, jodogne/orthanc-plugins (both indexing and storage turned on)? Is the process the same?

Finally, configuration file. Do we generate a sample configuration file from the "new" version, then transfer current configuration values to the sample config, or continue use of "old" configuration file as it is?

Thanks!!
Srey Seng

Sébastien Jodogne

unread,
Dec 5, 2016, 10:35:39 AM12/5/16
to Orthanc Users, ss...@zoomcare.com
In the sample commands provided, there is the "old" Orthanc docker command to start [..] jodogne/orthanc:0.9.4, followed by the "new" Orthanc docker command [..] jodogne/orthanc:1.1.0 /etc/orthanc --upgrade. Does this mean you need to have the "old" version running, and then run the "new" version with the upgrade option?

No, the "old" version must be stopped.


Additionally, the sample commands provided are using the default SQLite back-end. In the Database versioning section, there seems to be references to SQLlight back-end only. What about when using the PostgreSQL plugin, jodogne/orthanc-plugins (both indexing and storage turned on)? Is the process the same?

Yes, it works the same.

 
Finally, configuration file. Do we generate a sample configuration file from the "new" version, then transfer current configuration values to the sample config, or continue use of "old" configuration file as it is?

You can keep the "old" one: The syntax of the configuration file is compatible across the versions of Orthanc.

Sébastien-

Sreyroat Seng

unread,
Dec 5, 2016, 5:31:54 PM12/5/16
to Orthanc Users, ss...@zoomcare.com
Hello,

When upgrading Orthanc Docker w/ Postgres plugin (jodogne/orthanc-plugins) with the --upgrade option, are there any indication of the upgrade process?

I tried the sample commands provided earlier, upgrading jodogne/orthanc:0.9.4 to jodogne/orthanc:1.1.0 (default SQLlight back-end). I observe the expected outcome.

jodogne/orthanc:0.9.4 to jodogne/orthanc:1.1.0
(default SQLlight back-end)

When I run jodogne/orthanc:1.1.0 I get the following:
The database schema must be upgraded from version 5 to 6: Please run Orthanc with the "--upgrade" command-line option
 
When I run jodogne/orthanc:1.1.0 with the --upgrade option, I get the following:
Version of the Orthanc database: 5
Upgrading the database from schema version 5 to 6
Upgrading database version from 5 to 6
Upgrade: Reconstructing the main DICOM tags of all the patients...
Upgrade: Reconstructing the main DICOM tags of all the studies...
Upgrade: Reconstructing the main DICOM tags of all the series...
Upgrade: Reconstructing the main DICOM tags of all the instances...

In short, I do observe indication of effect of the --upgrade option in the logs.

jodogne/orthanc-plugins:0.9.5 to jodogne/orthanc-plugins:1.1.0
(Postgres for index / storage)

However, when I tried upgrading jodogne/orthanc-plugins:0.9.5 to jodogne/orthanc-plugins:1.1.0 (with Postgres for index / storage). I do not observe any indication of effect of the --upgrade option in the logs.

I cannot observe in the logs whether (1) the upgrade process has occurred and succeeded, (2) the upgrade process has occurred and failed, or (3) the upgrade process is not performed because it is not necessary. Question: In short, how can I tell if my upgrade attempt falls into one of the above options?

Thanks!!
Srey Seng

Sébastien Jodogne

unread,
Dec 6, 2016, 3:15:34 AM12/6/16
to Orthanc Users, ss...@zoomcare.com
Hello,
 
When I tried upgrading jodogne/orthanc-plugins:0.9.5 to jodogne/orthanc-plugins:1.1.0 (with Postgres for index / storage). I do not observe any indication of effect of the --upgrade option in the logs.

This is entirely normal, as Orthanc 0.9.5 shares the same database schema as Orthanc 1.1.0. You can check it in the Orthanc Book:

As a consequence, there is no need to upgrade the database. Upgrading is only necessary if switching to a version with a newer database schema: This was the case in the former example, in which Orthanc 0.9.4 uses DB schema version 5, whereas Orthanc 1.1.0 uses DB schema version 6.

Sébastien-

Sreyroat Seng

unread,
Dec 6, 2016, 1:23:00 PM12/6/16
to Orthanc Users, ss...@zoomcare.com
Hello,

Really appreciate the clarification! With this, I finally understand how to read the chart provided in the Database versioning page in the Orthanc Book.

To that end, based on the Database versioning page in the Orthanc Book, can I conclude that (1) Orthanc 0.9.5 - Orthanc 1.1.0 and Orthanc Mainline shares the same Database version v6, and that (2) one can safely run code from any of the Orthanc versions mentioned against the same database without ill effects?

Thank you!
Srey Seng

Sébastien Jodogne

unread,
Dec 6, 2016, 1:31:08 PM12/6/16
to Orthanc Users, ss...@zoomcare.com
Hello,

To that end, based on the Database versioning page in the Orthanc Book, can I conclude that (1) Orthanc 0.9.5 - Orthanc 1.1.0 and Orthanc Mainline shares the same Database version v6, and that (2) one can safely run code from any of the Orthanc versions mentioned against the same database without ill effects?

Yes, this is exactly how Orthanc database versioning works.

Sébastien- 

Sreyroat Seng

unread,
Dec 6, 2016, 1:48:28 PM12/6/16
to Orthanc Users, ss...@zoomcare.com
As always, I have learned a lot from this discussion, thank you!!

Thanks!!
Srey Seng

Sébastien Jodogne

unread,
Dec 6, 2016, 1:51:19 PM12/6/16
to Orthanc Users, ss...@zoomcare.com
As always, I have learned a lot from this discussion, thank you!!

You're welcome ;) 
Reply all
Reply to author
Forward
0 new messages