Mercurial > hg > orthanc-book
annotate Sphinx/source/users/backup.rst @ 660:a6e371768a70
dicom-as-json
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Apr 2021 12:41:31 +0200 |
parents | 011b01ccf52d |
children | c10fc0838f58 |
rev | line source |
---|---|
0 | 1 .. _backup: |
2 | |
3 Backup | |
4 ====== | |
5 | |
6 The way to backup Orthanc depends on the database back-end that is | |
7 used. In any case, you of course have to backup your | |
8 :ref:`configuration file <configuration>`. | |
9 | |
10 SQLite | |
11 ------ | |
12 | |
13 By default, Orthanc uses SQLite to store its database. In this case, | |
14 all the DICOM files together with the SQLite index are stored directly | |
15 in the filesystem. The backup procedure works as follows: | |
16 | |
17 1. Stop Orthanc. | |
18 2. Copy the following 3 elements: | |
19 | |
20 * Your configuration file. | |
21 * The DICOM files (by default, the subdirectories of the | |
22 ``OrthancStorage`` folder next to the configuration file). | |
23 * The SQLite index (by default, the ``OrthancStorage/index*`` files | |
24 next to the configuration file). | |
25 | |
26 3. Restart Orthanc. | |
27 | |
28 It is mandatory to stop Orthanc, as the Orthanc core makes the | |
29 assumption that it is the only process to access the SQLite database | |
30 at any time. | |
31 | |
32 Karsten Hilbert provided us with a `sample backup script | |
33 <https://github.com/jodogne/OrthancContributed/blob/master/Scripts/Backup/2014-01-31-KarstenHilbert.sh>`__ | |
34 for the official Debian package of Orthanc that automates this backup | |
35 procedure. Note that in this script, the call to the SQLite | |
36 command-line tool is used to force the `WAL replay | |
358
011b01ccf52d
fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
307
diff
changeset
|
37 <https://www.sqlite.org/wal.html>`__. This manual replay should not be |
0 | 38 necessary for Orthanc >= 0.7.3. |
39 | |
40 | |
154 | 41 PostgreSQL and MySQL |
42 -------------------- | |
0 | 43 |
44 The default SQLite engine is well adapted for DICOM routing or for | |
45 image buffering tasks, but not for enterprise scenarios. In such | |
46 cases, you are highly recommended to use the `PostgreSQL back-end | |
358
011b01ccf52d
fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
307
diff
changeset
|
47 <https://www.orthanc-server.com/static.php?page=postgresql>`__ or the |
154 | 48 `MySQL/MariaDB back-end |
358
011b01ccf52d
fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
307
diff
changeset
|
49 <https://www.orthanc-server.com/static.php?page=mysql>`__. |
0 | 50 |
51 If using PostgreSQL, you can do hot backups (i.e. while Orthanc is | |
52 running), and you benefit from all the flexibility of PostgreSQL | |
53 backup. These procedures are out of the scope of this manual. Please | |
54 check the `official backup and restore manual | |
358
011b01ccf52d
fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
307
diff
changeset
|
55 <https://www.postgresql.org/docs/devel/backup.html>`__. |
154 | 56 |
57 Similar backup procedures are available for MySQL and MariaDB as | |
58 well. Please check the official manual about `database backup methods | |
59 <https://dev.mysql.com/doc/refman/8.0/en/backup-methods.html>`__. | |
307 | 60 |
61 Here are some contributed documents: | |
62 | |
63 * `Backup for Windows 10, Orthanc and PostgreSQL plugin <https://blog.goo.ne.jp/wakida_ortho/e/3eb557fd134cf6136d5ba66cf72fd85a>`__ (in Japanese, 2020-02-02). |