vim /etc/gitlab/gitlab.rb
prometheus['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
gitlab_exporter['enable'] = false
prometheus_monitoring['enable'] = false
##################################
#备份参数设置
##################################
#备份是否打开
gitlab_rails['manage_backup_path'] = true
#备份目录地址路径
gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"
#备份的权限设置
gitlab_rails['backup_archive_permissions'] = 0644
#备份保存时间,超过事件覆盖掉;
gitlab_rails['backup_keep_time'] = 604800
gitlab-ctl reconfigure
gitlab-rake gitlab:backup:create
使用以上命令会在/var/opt/gitlab/backups目录下创建一个名称类似为*backup.tar的压缩包,
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
cd /var/opt/gitlab/backups
gitlab-rake gitlab:backup:restore BACKUP=1537261122_2018_09_18_9.2.5
gitlab-ctl start
下一篇:汇编学习基础知识【记录】