chore(gitlab-package): create configuration backups

This commit is contained in:
Michele Cereda
2024-06-10 22:52:36 +02:00
parent bde73759ef
commit e95bcc8d6b
2 changed files with 22 additions and 0 deletions

View File

@@ -150,6 +150,10 @@ sudo gitlab-backup create BACKUP='prefix_override' STRATEGY='copy'
sudo gitlab-backup create … \
SKIP='db,repositories,uploads,builds,artifacts,pages,lfs,terraform_state,registry,packages,ci_secure_files'
# Create backups of the configuration.
sudo gitlab-ctl backup-etc
sudo gitlab-ctl backup-etc && ls -t '/etc/gitlab/config_backup/' | head -n '1'
# Restore backups.
sudo aws s3 cp 's3://backups/gitlab/gitlab-secrets.json' '/etc/gitlab/gitlab-secrets.json' \
&& sudo aws s3 cp 's3://backups/gitlab/gitlab.rb' '/etc/gitlab/gitlab.rb' \