comparison Sphinx/source/users/backup.rst @ 0:901e8961f46e

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Apr 2016 12:57:38 +0200
parents
children 669ea65ba7fb
comparison
equal deleted inserted replaced
-1:000000000000 0:901e8961f46e
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
37 <http://www.sqlite.org/wal.html>`__. This manual replay should not be
38 necessary for Orthanc >= 0.7.3.
39
40
41 PostgreSQL
42 ----------
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
47 <http://www.orthanc-server.com/static.php?page=postgresql>`__.
48
49 If using PostgreSQL, you can do hot backups (i.e. while Orthanc is
50 running), and you benefit from all the flexibility of PostgreSQL
51 backup. These procedures are out of the scope of this manual. Please
52 check the `official backup and restore manual
53 <http://www.postgresql.org/docs/devel/static/backup.html>`__.