puppet-gitlab
puppet-gitlab copied to clipboard
Documentation for enabling/configuring backups
Would it be possible to add to the documentation examples for enabling/configuring backups?
Thanks! :)
Yeah, now that Gitlab has more functionality built into the backup command, we should probably document exactly what the cron support we have does, and does not do.
in particular, i have found it does not backup the configuration which seems.... problematic, at best. we do this instead:
file { '/usr/local/sbin/tpo-gitlab-backup':
mode => '0555',
content => @(EOF),
#!/bin/sh
set -e
umask 0077
/usr/bin/gitlab-rake gitlab:backup:create CRON=1
NOW=$(date +"%Y%m%dT%H%M")
SNAPSHOT="/srv/gitlab-backup/config_backup-$NOW.tar.gz"
tar -C /var/opt/gitlab -czf "$SNAPSHOT" gitlab-rails/etc/
find /srv/gitlab-backup/config_backup* -mtime +1 -delete;
| EOF
}