dotfiles-server/bin/gitlab-backup.sh

10 lines
337 B
Bash
Raw Normal View History

2016-05-07 22:03:04 +02:00
# 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