备份
[root@linux ~]# gitlab-rake gitlab:backup:create
备份文件存放目录
[root@linux ~]# ls /var/opt/gitlab/backups/
1577272892_2019_12_25_12.6.0-ee_gitlab_backup.tar
恢复
恢复之前需要先停掉2个服务,避免有数据持续写入
[root@linux ~]# gitlab-ctl stop unicorn ; gitlab-ctl stop sidekiq
[root@linux ~]# gitlab-rake gitlab:backup:restore BACKUP=1577272892_2019_12_25_12.6.0-ee #指定备份文件的前缀
恢复后再次启动这两个服务
[root@linux ~]# gitlab-ctl start unicorn
ok: run: unicorn: (pid 9630) 70s
[root@linux ~]# gitlab-ctl start sidekiq
ok: run: sidekiq: (pid 9620) 84s