Describe virgin restores.

Restores on a system with no existing database need an additional
step. In addition the gitlab backup does not backup the `ssh/`
directory which is where the host keys for the ssh server are
kept.
This commit is contained in:
Kevin Lyda 2016-12-12 19:38:04 +00:00
parent 42c2fcc895
commit 5c0b3965d6

View File

@ -1028,6 +1028,14 @@ Before performing a restore make sure the container is stopped and removed to av
docker stop gitlab && docker rm gitlab
```
If this is a fresh database that you're doing the restore on, first
you need to prepare the database:
```bash
docker run --name gitlab -it --rm [OPTIONS] \
sameersbn/gitlab:8.14.4 app:rake db:setup
```
Execute the rake task to restore a backup. Make sure you run the container in interactive mode `-it`.
```bash
@ -1051,6 +1059,12 @@ docker-compose run --rm gitlab app:rake gitlab:backup:restore # List available b
docker-compose run --rm gitlab app:rake gitlab:backup:restore BACKUP=1417624827 # Choose to restore from 1417624827
```
## Host Key Backups (ssh)
SSH keys are not backed up in the normal gitlab backup process. You
will need to backup the `ssh/` directory in the data volume by hand
and you will want to restore it prior to doing a gitlab restore.
## Automated Backups
The image can be configured to automatically take backups `daily`, `weekly` or `monthly` using the `GITLAB_BACKUP_SCHEDULE` configuration option.