gitlab 备份与恢复

gitlab 备份与恢复

注: 仅适用于使用 For omnibus installations 安装的gitlab

1. 执行gitlab数据备份

sudo gitlab-rake gitlab:backup:create

默认备份文件储存在 /var/opt/gitlab/backups/171532691_gitlab_backup.tar

2. gitlab从备份中还原

sudo cp 171532691_gitlab_backup.tar  /var/opt/gitlab/backups/ 
sudo gitlab-ctl stop unicorn
sudo gitlab-ctl stop sidekiq
sudo gitlab-rake gitlab:backup:restore BACKUP=171532691   -- 备份文件名的前缀
sudo gitlab-ctl start
sudo gitlab-rake gitlab:check SANITIZE=true

你可能感兴趣的:(Gitlab,Ubuntu相关技术文档)