• Gitlab 备份、恢复、平级迁移


    1、备份

    修改备份配置,gitlab配置文件(/etc/gitlab/gitlab.rb

    # 备份文件的保存路径
    gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"
    
    # 备份文件的权限
    gitlab_rails['backup_archive_permissions'] = 0644
    
    # 备份文件的保存时间,单位 秒
    gitlab_rails['backup_keep_time'] = 2419200

    # 添加定时任务,自动备份
    [root@gitlab-cxzh ~]# crontab -l
    00 03 * * 1 gitlab-rake gitlab:backup:create > /dev/null 2>&1

    2、恢复

    # 停止相关数据连接服务
    gitlab-ctl stop unicorn 
    gitlab-ctl stop sidekiq
    
    # 备份文件的存放路径:/var/opt/gitlab/backups/,默认放在这儿,也可以自己修改(/etc/gitlab/gitlab.rb) chmod
    777 /var/opt/gitlab/backups/1530156812_2018_06_28_10.8.4_gitlab_backup.tar gitlab-rake gitlab:backup:restore BACKUP=1530156812_2018_06_28_10.8.4 ⚠️:输入两次yes并回车 # 启动gitlab gitlab-ctl start

    3、平级迁移

    首先安装gitlab,然后拷贝备份文件到新服务器的/var/opt/gitlab/backups/路径中,然后重复第二部分恢复就好了

    作者:Star-Hitian,转载请注明原文链接:https://www.cnblogs.com/Star-Haitian/p/14981974.html

  • 相关阅读:
    百度之星初赛 A
    百度之星 初赛 BC
    2016 百度之星资格赛
    codeforces 749
    codeforces 785
    HDU 4617
    网络流 poj 2195
    网络流 poj 3436 poj 3281
    codeforces 780 C
    idea激活
  • 原文地址:https://www.cnblogs.com/Star-Haitian/p/14981974.html
Copyright © 2020-2023  润新知