How to migrate gitlab backups to new server which has latest gitlab version

后端 未结 3 1060
渐次进展
渐次进展 2020-12-30 09:40

I am trying to migrate my gitlab backups for my old server to new server. my old server has gitlab (gitlab-6.5.1-0) and my new server has gitlab version (gitlab 6.6.5-omnibu

3条回答
  •  失恋的感觉
    2020-12-30 10:16

    This error message is produced by lib/backup/manager.rb#L87-L92:

      settings = YAML.load_file("backup_information.yml")
      ENV["VERSION"] = "#{settings[:db_version]}" if settings[:db_version].to_i > 0
    
      # restoring mismatching backups can lead to unexpected problems
      if settings[:gitlab_version] != Gitlab::VERSION
        puts "GitLab version mismatch:".red
    

    It seems to force an incremental backup, as described in this comment:

    I have faced the same issue when restoring the backup to a new server.

    backup.rake checks GITLAB commit number at time of backup is taken and when you are restoring to the same branch name from latest check out.

    I have to:

    • delete 5-2-stable and
    • check out again 5-2-stable with the same commit hash ( git checkout -b 5-2-stable COMMIT-HASH),
    • ran all tasks as installing a fresh 5-2-stable release with same config/gitlab.yml, config/database.yml.
    • Then I have copied backup.tar file into default /home/git/gitlab/tmp/backups and ran restore rake task.

    It worked without any problem. Then I have followed 5-2-stable to 5-3-stable upgrade and it went all well.

提交回复
热议问题