gitlab学习(7)---gitlab数据恢复

gitlab备份参考:https://mp.csdn.net/mdeditor/84890522#
备份文件:

/home/backups/1499244722_2017_07_05_9.2.6_gitlab_backup.tar

停止 unicorn 和 sidekiq ,保证数据库没有新的连接,不会有写数据情况

# 停止相关数据连接服务
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
# 指定恢复文件,会自动去备份目录找。确保备份目录中有这个文件。
# 指定文件名的格式类似:1499242399_2017_07_05_9.2.6,程序会自动在文件名后补上:“_gitlab_backup.tar”
# 一定按这样的格式指定,否则会出现 The backup file does not exist! 的错误
对包加权限
chmod -R 777 *
gitlab-rake gitlab:backup:restore BACKUP=1499242399_2017_07_05_9.2.6
# 启动Gitlab
gitlab-ctl start

猜你喜欢

转载自blog.csdn.net/weixin_43606948/article/details/84890629
今日推荐