dotfiles-server/bin/gitlab-backup.sh

12 lines
358 B
Bash
Raw Normal View History

#!/usr/bin/env bash
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