私有gitlab部署
gitlab-ctl statusgitlab-ctl start/stop/restart
gitlab-ctl tail nginx # 查看日志
gitlab-ctl tail postgresql
# 备份gitlab数据
/usr/bin/gitlab-rake gitlab:backup:create # 备份目录在:/var/opt/gitlab/backups,需要修改修改配置文件:gitlab_rails['backup_path']
# 加入到crotob定时备份
0 2 * * * /usr/bin/gitlab-rake gitlab:backup:create
# 查看备份文件
ls /var/opt/gitlab/backups/
1473317720_gitlab_backup.tar
# 恢复gitlab数据,需要先停止unicorn 和 sidekiq,保证没有新数据写入
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
#1406691018为时间戳
gitlab-rake gitlab:backup:restore BACKUP=1406691018
gitlab-ctl start unicorn
gitlab-ctl start sidekiq
页:
[1]