A collection of scripts to use omnibus-gitlab's own backup gitlab-rake
command on a cron schedule and rsync to another server if wanted or to restore a backup.
clone to your directory of choice. I usually use /usr/local/sbin
Change /etc/gitlab/gitlab.rb
to expire backups
# backup keep time
gitlab_rails['backup_keep_time'] = 604800
cp auto-gitlab-backup.conf.sample auto-gitlab-backup.conf
edit auto-gitlab-backup.conf
remoteUser="" #user account on remote server
remoteServer="" #remote host
remoteDest="" #remote path
sshKeyPath="" #path to an alternate ssh key, if needed.
remotePort=22 # ssh port
## only use the below settings if your destination is using rsync in daemon mode
remoteModule=""
rsync_password_file=""
Example for crontab to run at 5:05am everyday.
5 5 * * * /usr/local/sbin/auto-gitlab-backup/auto-gitlab-backup.sh
Still under development but useful
run ./restoreGitLab.sh -r
and it will attempt to restore a backup. You may have to run some rake commands manually.