diff options
Diffstat (limited to 'doc/raketasks')
-rw-r--r-- | doc/raketasks/backup_restore.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 050a2a7d92d..574ba961cb0 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -100,6 +100,13 @@ the gitlab task runner pod via `kubectl`. Refer to [backing up a GitLab installa kubectl exec -it <gitlab task-runner pod> backup-utility ``` +Similarly to the Kubernetes case, if you have scaled out your GitLab +cluster to use multiple application servers, you should pick a +designated node (that won't be auto-scaled away) for running the +backup rake task. Because the backup rake task is tightly coupled to +the main Rails application, this is typically a node on which you're +also running Unicorn/Puma and/or Sidekiq. + Example output: ``` @@ -195,6 +202,26 @@ To use the `copy` strategy instead of the default streaming strategy, specify sudo gitlab-rake gitlab:backup:create STRATEGY=copy ``` +### Backup filename + +By default a backup file is created according to the specification in [the Backup timestamp](#backup-timestamp) section above. You can however override the `[TIMESTAMP]` part of the filename by setting the `BACKUP` environment variable. For example: + +```sh +sudo gitlab-rake gitlab:backup:create BACKUP=dump +``` + +The resulting file will then be `dump_gitlab_backup.tar`. This is useful for systems that make use of rsync and incremental backups, and will result in considerably faster transfer speeds. + +### Rsyncable + +To make sure the generated archive is intelligently transferable by rsync, the `GZIP_RSYNCABLE=yes` option can be set. This will set the `--rsyncable` option to `gzip`. This is only useful in combination with setting [the Backup filename option](#backup-filename). + +Note that the `--rsyncable` option in `gzip` is not guaranteed to be available on all distributions. To verify that it is available in your distribution you can run `gzip --help` or consult the man pages. + +```sh +sudo gitlab-rake gitlab:backup:create BACKUP=dump GZIP_RSYNCABLE=yes +``` + ### Excluding specific directories from the backup You can choose what should be exempt from the backup up by adding the environment variable `SKIP`. |