gitlab backup refinements

This commit is contained in:
Matthias Kretschmann 2017-01-21 01:11:07 +01:00
parent ebb2e4ef5e
commit 781781e616
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC
1 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,10 @@
# Create a time-stamped .tar file in the current directory.
# The .tar file will be readable only to root.
cd /var/opt/gitlab/backups/
sh -c 'umask 0077; tar -cf $(date "+etc-gitlab-%s.tar") -C / etc/gitlab'
sh -c 'umask 0077; tar -cf $(date "+%F+etc-gitlab-%s.tar") -C / etc/gitlab'
# run GitLab system backup, will upload to Google Cloud Storage bucket
gitlab-rake gitlab:backup:create
# run GitLab system backup
gitlab-rake gitlab:backup:create CRON=1
# sync with Google Cloud Storage bucket
/home/m/code/google-cloud-sdk/bin/gsutil rsync -r . gs://git-berlin-backups