Backup skips the Registry, though they are on the same filesystem. Restore afterwards fails:
“…cannot open /var/opt/gitlab/backups/registry.tar.gz”
and exits
We are backing the GitLab data without LFS like this:
gitlab-backup create BACKUP=$(date +%s)-gitlab-ee SKIP=lfs
2020-03-27 08:31:25 -0400 – Dumping database …
Dumping PostgreSQL database gitlabhq_production … [DONE]
2020-03-27 08:31:27 -0400 – done
2020-03-27 08:31:27 -0400 – Dumping repositories …
- root/rarchiver (@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b) … [DONE]
[SKIPPED] Wiki - root/premium(@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35) … [DONE]
[SKIPPED] Wiki - root/test-web (@hashed/4b/22/4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a) … [DONE]
[SKIPPED] Wiki - root/test-web-lfs (@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d) … [DONE]
[SKIPPED] Wiki - test-maintainer/ghfghf (@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683) … [DONE]
[SKIPPED] Wiki
2020-03-27 08:31:56 -0400 – done
2020-03-27 08:31:56 -0400 – Dumping uploads …
2020-03-27 08:31:56 -0400 – done
2020-03-27 08:31:56 -0400 – Dumping builds …
2020-03-27 08:31:56 -0400 – done
2020-03-27 08:31:56 -0400 – Dumping artifacts …
2020-03-27 08:31:56 -0400 – done
2020-03-27 08:31:56 -0400 – Dumping pages …
2020-03-27 08:31:56 -0400 – done
2020-03-27 08:31:56 -0400 – Dumping lfs objects …
2020-03-27 08:31:56 -0400 – [SKIPPED]
2020-03-27 08:31:56 -0400 – Dumping container registry images …
2020-03-27 08:31:56 -0400 – [DISABLED]
Creating backup archive: 1585312274-gitlab-ee_gitlab_backup.tar … done
Uploading backup archive to remote storage … skipped
Deleting tmp directories … done
done
done
done
done
done
done
Deleting old backups … skipping
Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data
and are not included in this backup. You will need these files to restore a backup.
Please back them up manually.
Backup task is done.
tar tvf /mnt/sda2/backups/1585312274-gitlab-ee_gitlab_backup.tar
drwx------ git/git 0 2020-03-27 08:31 repositories/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/6b/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/6b/86/
-rw-r–r-- git/git 24751 2020-03-27 08:31 repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.bundle
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b/
-rw-r–r-- git/git 10240 2020-03-27 08:31 repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b/custom_hooks.tar
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/d4/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/d4/73/
-rw-r–r-- git/git 2286603549 2020-03-27 08:31 repositories/@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.bundle
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/4b/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/4b/22/
-rw-r–r-- git/git 37104040 2020-03-27 08:31 repositories/@hashed/4b/22/4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a.bundle
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/4b/22/4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/ef/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/ef/2d/
-rw-r–r-- git/git 35207806 2020-03-27 08:31 repositories/@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.bundle
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/e7/
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/e7/f6/
-rw-r–r-- git/git 372284 2020-03-27 08:31 repositories/@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.bundle
drwxr-xr-x git/git 0 2020-03-27 08:31 repositories/@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683/
drwxr-xr-x git/git 0 2020-03-27 08:31 db/
-rw------- git/git 22499261 2020-03-27 08:31 db/database.sql.gz
-rw------- git/git 151 2020-03-27 08:31 uploads.tar.gz
-rw------- git/git 278 2020-03-27 08:31 builds.tar.gz
-rw------- git/git 12265 2020-03-27 08:31 artifacts.tar.gz
-rw------- git/git 156 2020-03-27 08:31 pages.tar.gz
-rw-r–r-- git/git 196 2020-03-27 08:31 backup_information.yml
I tested the following:
- Updating gitlab from 12.7.6-ee to 12.9.1-ee.0 on debian 10 without success
- Copying the original registry and gzipping it to /var/opt/gitlab/backups/registry.tar.gz and it worked, but requires extra maintenance and is not by design.
Your help is highly appreciated