카테고리 없음
gitlab backup and restor
getupfor1
2017. 1. 6. 13:10
#[backup]
[root]# gitlab-rake gitlab:backup:create
#[backup file location]
[root]# cd /var/opt/gitlab/backups
#[the backup file extention is .tar][root]# ls
1483669690_gitlab_backup.tar
#[stop git DB related process]
[root]# gitlab-ctl stop unicorn
[root]# gitlab-ctl stop sidekiq
#[restor]
[root]# gitlab-rake gitlab:backup:restore BACKUP=
1483669690
#[restart git]
[root]# gitlab-ctl start
[root]# gitlab-rake gitlab:satellites:create
[root]# gitlab-rake gitlab:check SANITIZE=true
#[auto backup using by crontab]
#[this command will backup every month every day at 2:00]
[root]# crontab -e
0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create
#[restart the crontab]
[root]# /etc/init.d/crond restart