From 77237c5a6b9044f58beabc54d3589e5fa09cbfba Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 Mar 2020 00:07:49 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- doc/raketasks/backup_restore.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc/raketasks') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index e768c38fd23..54c550f999c 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -271,6 +271,31 @@ For installations from source: sudo -u git -H bundle exec rake gitlab:backup:create SKIP=db,uploads RAILS_ENV=production ``` +### Skipping tar creation + +The last part of creating a backup is generation of a `.tar` file containing +all the parts. In some cases (for example, if the backup is picked up by other +backup software) creating a `.tar` file might be wasted effort or even directly +harmful, so you can skip this step by adding `tar` to the `SKIP` environment +variable. + +Adding `tar` to the `SKIP` variable leaves the files and directories containing the +backup in the directory used for the intermediate files. These files will be +overwritten when a new backup is created, so you should make sure they are copied +elsewhere, because you can only have one backup on the system. + +For Omnibus GitLab packages: + +```shell +sudo gitlab-backup create SKIP=tar +``` + +For installations from source: + +```shell +sudo -u git -H bundle exec rake gitlab:backup:create SKIP=tar RAILS_ENV=production +``` + ### Uploading backups to a remote (cloud) storage Starting with GitLab 7.4 you can let the backup script upload the '.tar' file it creates. @@ -658,6 +683,10 @@ lose access to your GitLab server. You may also want to restore any TLS keys, certificates, or [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079). +Starting with GitLab 12.9 if an untarred backup (like the ones made with +`SKIP=tar`) is found, and no backup is chosen with `BACKUP=`, the +untarred backup is used. + Depending on your case, you might want to run the restore command with one or more of the following options: -- cgit v1.2.1