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

View File

@ -5,7 +5,10 @@
# Create a time-stamped .tar file in the current directory. # Create a time-stamped .tar file in the current directory.
# The .tar file will be readable only to root. # The .tar file will be readable only to root.
cd /var/opt/gitlab/backups/ 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 # run GitLab system backup
gitlab-rake gitlab:backup:create 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