Show More
@@ -9,10 +9,14 b' Backup and Restore' | |||||
9 | To snapshot an instance of |RCE|, and save its settings, you need to backup the |
|
9 | To snapshot an instance of |RCE|, and save its settings, you need to backup the | |
10 | following parts of the system at the same time. |
|
10 | following parts of the system at the same time. | |
11 |
|
11 | |||
12 | * The |repos| managed by the instance. |
|
12 | * The |repos| managed by the instance together with the stored Gists. | |
13 | * The |RCE| database. |
|
13 | * The |RCE| database. | |
14 | * Any configuration files or extensions that you've configured. In most |
|
14 | * Any configuration files or extensions that you've configured. In most | |
15 | cases it's only the :file:`rhodecode.ini` file. |
|
15 | cases it's only the :file:`rhodecode.ini` file. | |
|
16 | * Installer files such as those in `/opt/rhodecode` can be backed-up, however | |||
|
17 | it's not required since in case of a recovery installer simply | |||
|
18 | re-creates those. | |||
|
19 | ||||
16 |
|
20 | |||
17 | .. important:: |
|
21 | .. important:: | |
18 |
|
22 | |||
@@ -30,11 +34,17 b' Repository Backup' | |||||
30 | ^^^^^^^^^^^^^^^^^ |
|
34 | ^^^^^^^^^^^^^^^^^ | |
31 |
|
35 | |||
32 | To back up your |repos|, use the API to get a list of all |repos| managed, |
|
36 | To back up your |repos|, use the API to get a list of all |repos| managed, | |
33 | and then clone them to your backup location. |
|
37 | and then clone them to your backup location. This is the most safe backup option. | |
|
38 | Backing up the storage directory could potentially result in a backup of | |||
|
39 | partially committed files or commits. (Backup taking place during a big push) | |||
|
40 | As an alternative you could use a rsync or simple `cp` commands if you can | |||
|
41 | ensure your instance is only in read-only mode or stopped at the moment. | |||
|
42 | ||||
34 |
|
43 | |||
35 | Use the ``get_repos`` method to list all your managed |repos|, |
|
44 | Use the ``get_repos`` method to list all your managed |repos|, | |
36 | and use the ``clone_uri`` information that is returned. See the :ref:`api` |
|
45 | and use the ``clone_uri`` information that is returned. See the :ref:`api` | |
37 | for more information. |
|
46 | for more information. Be sure to keep the structure or repositories with their | |
|
47 | repository groups. | |||
38 |
|
48 | |||
39 | .. important:: |
|
49 | .. important:: | |
40 |
|
50 | |||
@@ -82,13 +92,18 b' Configuration File Backup' | |||||
82 | Depending on your setup, you could have a number of configuration files that |
|
92 | Depending on your setup, you could have a number of configuration files that | |
83 | should be backed up. You may have some, or all of the configuration files |
|
93 | should be backed up. You may have some, or all of the configuration files | |
84 | listed in the :ref:`config-rce-files` section. Ideally you should back these |
|
94 | listed in the :ref:`config-rce-files` section. Ideally you should back these | |
85 | up at the same time as the database and |repos|. |
|
95 | up at the same time as the database and |repos|. It really depends on if you need | |
|
96 | the configuration file like logs, custom modules. We always recommend backing | |||
|
97 | those up. | |||
86 |
|
98 | |||
87 | Gist Backup |
|
99 | Gist Backup | |
88 | ^^^^^^^^^^^ |
|
100 | ^^^^^^^^^^^ | |
89 |
|
101 | |||
90 |
To backup the gists on your |RCE| instance you |
|
102 | To backup the gists on your |RCE| instance you usually have to backup the | |
91 | ``get_gists`` API methods to fetch the gists for each user on the instance. |
|
103 | gist storage path. If this haven't been changed it's located inside | |
|
104 | :file:`.rc_gist_store` and the metadata in :file:`.rc_gist_metadata`. | |||
|
105 | You can use the ``get_users`` and ``get_gists`` API methods to fetch the | |||
|
106 | gists for each user on the instance. | |||
92 |
|
107 | |||
93 | Extension Backups |
|
108 | Extension Backups | |
94 | ^^^^^^^^^^^^^^^^^ |
|
109 | ^^^^^^^^^^^^^^^^^ | |
@@ -107,15 +122,17 b' the :ref:`indexing-ref` section.' | |||||
107 | Restoration Steps |
|
122 | Restoration Steps | |
108 | ----------------- |
|
123 | ----------------- | |
109 |
|
124 | |||
110 |
To restore an instance of |RCE| from its backed up components, |
|
125 | To restore an instance of |RCE| from its backed up components, to a fresh | |
111 | following steps. |
|
126 | system use the following steps. | |
112 |
|
127 | |||
113 | 1. Install a new instance of |RCE|. |
|
128 | 1. Install a new instance of |RCE| using sqlite option as database. | |
114 | 2. Once installed, configure the instance to use the backed up |
|
129 | 2. Restore your database. | |
115 | :file:`rhodecode.ini` file. Ensure this file points to the backed up |
|
130 | 2. Once installed, replace you backed up the :file:`rhodecode.ini` with your | |
|
131 | backup version. Ensure this file points to the restored | |||
116 | database, see the :ref:`config-database` section. |
|
132 | database, see the :ref:`config-database` section. | |
117 |
3. Restart |RCE| and remap and rescan your |repos| |
|
133 | 3. Restart |RCE| and remap and rescan your |repos| to verify filesystem access, | |
118 | :ref:`remap-rescan` section. |
|
134 | see the :ref:`remap-rescan` section. | |
|
135 | ||||
119 |
|
136 | |||
120 | Post Restoration Steps |
|
137 | Post Restoration Steps | |
121 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
138 | ^^^^^^^^^^^^^^^^^^^^^^ |
General Comments 0
You need to be logged in to leave comments.
Login now