add gitlab backup script

This commit is contained in:
Matthias Kretschmann 2016-05-07 22:03:04 +02:00
parent 13ce33c8a0
commit c161459996
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC

9
bin/gitlab-backup.sh Executable file
View File

@ -0,0 +1,9 @@
# needs to run as root
# 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'
# run GitLab system backup, will upload to Google Cloud Storage bucket
gitlab-rake gitlab:backup:create