dotfiles-server/bin/gitlab-backup.sh

10 lines
337 B
Bash
Executable File

# 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