more gitlab backup
This commit is contained in:
parent
e163f941df
commit
d0bd25c235
@ -1,11 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# needs to run as root
|
||||
#
|
||||
# setup as cron job:
|
||||
#
|
||||
# sudo crontab -e
|
||||
# 0 2 * * * /bin/gitlab-backup.sh
|
||||
#
|
||||
|
||||
# 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 "+%F+etc-gitlab-%s.tar") -C / etc/gitlab'
|
||||
sh -c 'umask 0077; tar -cf $(date "+%s-%F-etc-gitlab.tar") -C / etc/gitlab'
|
||||
|
||||
# run GitLab system backup
|
||||
gitlab-rake gitlab:backup:create CRON=1
|
||||
|
Loading…
Reference in New Issue
Block a user