Commit 6938fd484c3fe15475aa79b675942fc3fdb94f03
1 parent
128ba5b5
Exists in
master
and in
2 other branches
Add configuration backup/restore instructions
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
README.md
| ... | ... | @@ -134,6 +134,30 @@ Note that you cannot use a Unicorn reload to update the Ruby runtime. |
| 134 | 134 | |
| 135 | 135 | ## Configuration |
| 136 | 136 | |
| 137 | +### Backup and restore omnibus-gitlab configuration | |
| 138 | + | |
| 139 | +All configuration for omnibus-gitlab is stored in `/etc/gitlab`. To backup your | |
| 140 | +configuration, just backup this directory. | |
| 141 | + | |
| 142 | +```shell | |
| 143 | +# Example backup command for /etc/gitlab: | |
| 144 | +# Create a time-stamped .tar file in the current directory. | |
| 145 | +# The .tar file will be readable only to root. | |
| 146 | +sudo sh -c 'umask 0077; tar -cf $(date "+etc-gitlab-%s.tar") -C / etc/gitlab' | |
| 147 | +``` | |
| 148 | + | |
| 149 | +You can extract the .tar file as follows. | |
| 150 | + | |
| 151 | +```shell | |
| 152 | +# Rename the existing /etc/gitlab, if any | |
| 153 | +sudo mv /etc/gitlab /etc/gitlab.$(date +%s) | |
| 154 | +# Change the example timestamp below for your configuration backup | |
| 155 | +sudo tar -xf etc-gitlab-1399948539.tar -C / | |
| 156 | +``` | |
| 157 | + | |
| 158 | +Remember to run `sudo gitlab-ctl reconfigure` after restoring a configuration | |
| 159 | +backup. | |
| 160 | + | |
| 137 | 161 | ### Configuring the external URL for GitLab |
| 138 | 162 | |
| 139 | 163 | In order for GitLab to display correct repository clone links to your users | ... | ... |