Mercurial > hg > orthanc-book
comparison Sphinx/source/users/replication.rst @ 76:c2f2202f54f2
more information about upgrade
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Dec 2016 10:36:42 +0100 |
parents | 16d516fdc642 |
children | 365427cebb64 |
comparison
equal
deleted
inserted
replaced
75:16d516fdc642 | 76:c2f2202f54f2 |
---|---|
15 | 15 |
16 As explained :ref:`elsewhere in the Orthanc Book <db-versioning>`, | 16 As explained :ref:`elsewhere in the Orthanc Book <db-versioning>`, |
17 successive versions of Orthanc might use a different version of the | 17 successive versions of Orthanc might use a different version of the |
18 database schema. If this happens, Orthanc will refuse to start (with | 18 database schema. If this happens, Orthanc will refuse to start (with |
19 an explicit message in its :ref:`logs <log>`), to let the user decides | 19 an explicit message in its :ref:`logs <log>`), to let the user decides |
20 whether she actually wants to upgrade the database. At this point, the | 20 whether she actually wants to upgrade the database. |
21 user might indeed decide to modify its :ref:`configuration file | 21 |
22 <configuration>` to create a new database elsewhere on the filesystem. | 22 At this point, the user could indeed choose to modify its |
23 :ref:`configuration file <configuration>` in order to create a new | |
24 database elsewhere on the filesystem (if using the default SQLite | |
25 backend), or on the database management system (e.g. if using | |
26 :ref:`PostgreSQL <postgresql>`). This is important to let the user | |
27 experiment a new version of Orthanc, while keeping the older version | |
28 up and running. | |
23 | 29 |
24 If you decide to upgrade the database schema, you have to apply the | 30 If you decide to upgrade the database schema, you have to apply the |
25 following 3 steps: | 31 following 3 steps: |
26 | 32 |
27 1. If not done yet, stop the running Orthanc service: | 33 1. If not done yet, stop the running Orthanc service: |
29 * Under Microsoft Windows, use the `services control panel | 35 * Under Microsoft Windows, use the `services control panel |
30 <https://en.wikipedia.org/wiki/Windows_service>`__. | 36 <https://en.wikipedia.org/wiki/Windows_service>`__. |
31 * Under Debian, use ``sudo /etc/init.d/orthanc stop``. | 37 * Under Debian, use ``sudo /etc/init.d/orthanc stop``. |
32 | 38 |
33 2. Manually call Orthanc with the ``--upgrade`` command-line option, | 39 2. Manually call Orthanc with the ``--upgrade`` command-line option, |
34 and point to your default configuration file: | 40 and point to your configuration file: |
35 | 41 |
36 * Under Microsoft Windows, ``Orthanc.exe c:/Orthanc/``. | 42 * Under Microsoft Windows, ``Orthanc.exe c:/Orthanc/ --upgrade``. |
37 * Under Debian, use ``sudo /usr/sbin/Orthanc /etc/orthanc/ --upgrade``. | 43 * Under Debian, use ``sudo /usr/sbin/Orthanc /etc/orthanc/ --upgrade``. |
38 | 44 |
39 3. Start the Orthanc service again: | 45 3. Once the upgrade process is over, restart the Orthanc service: |
40 | 46 |
41 * Under Microsoft Windows, use the `services control panel | 47 * Under Microsoft Windows, use the `services control panel |
42 <https://en.wikipedia.org/wiki/Windows_service>`__. | 48 <https://en.wikipedia.org/wiki/Windows_service>`__. |
43 * Under Debian, use ``sudo /etc/init.d/orthanc stop``. | 49 * Under Debian, use ``sudo /etc/init.d/orthanc start``. |
44 | 50 |
45 Note that, depending on the size of the Orthanc database, upgrading | 51 **Important remarks:** |
46 the database schema might take time. | 52 |
53 * Orthanc is now considered as **stable**, which means that no upgrade | |
54 in the database schema should occur in the near future. | |
55 * Depending on the size of the Orthanc database, upgrading the | |
56 database schema might take time, as this operation implies | |
57 re-reading all the DICOM instances from the disk. | |
58 * In the case of the official Debian and Fedora packages, the default | |
59 location of the database changes with the version of its schema. | |
60 For instance, DB schema version 6 will be stored in | |
61 ``/var/lib/orthanc/db-v6/``. If upgrading the package (and if the | |
62 configuration files are purged), a new database will automatically | |
63 be created on the disk. Old data can be recovered either by changing | |
64 the configuration in ``/etc/orthanc/`` to point to the previous | |
65 location of the database then using ``--upgrade`` as written above, | |
66 or by using the instructions for replication below. | |
47 | 67 |
48 | 68 |
49 Direct access to the filesystem | 69 Direct access to the filesystem |
50 ------------------------------- | 70 ------------------------------- |
51 | 71 |
52 The most direct way to replicate consists in using the | 72 The most direct way to replicate an instance of Orthanc consists in |
53 `ImportDicomFiles | 73 using the `ImportDicomFiles |
54 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`_ | 74 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`_ |
55 script of the Orthanc distribution. For instance, the following | 75 script of the Orthanc distribution. For instance, the following |
56 command would recursively explore the content of the ``OrthancStorage`` | 76 command would recursively explore the content of the |
57 folder (where Orthanc stores its DICOM files by default), and send | 77 ``OrthancStorage`` folder (where Orthanc stores its DICOM files by |
58 each DICOM file inside this folder to the instance of Orthanc whose | 78 default), and send each DICOM file inside this folder to the instance |
59 REST API is listening on ``http://192.168.0.2:8042``:: | 79 of Orthanc whose REST API is listening on |
80 ``http://192.168.0.2:8042``:: | |
60 | 81 |
61 $ python ImportDicomFiles.py 192.168.0.2 8042 OrthancStorage | 82 $ python ImportDicomFiles.py 192.168.0.2 8042 OrthancStorage |
62 | 83 |
63 This method will only succeed if: | 84 This method will only succeed if: |
64 | 85 |