Unable to restore Backup from Single node to Gitaly Cluster

Hello,

I have a single node GitLab with latest community edition version and took a backup from it.
I have created a Gitaly Cluster with the following architecture: -

  • Gitlab Server for the users to access
  • Praefect Server
  • 3x Gitaly servers that are being controlled by the praefect server
  • PostgreSQL server for Praefect Database

The GitLab Cluster nodes are all running on the latest community version same as the single node version.

I have tried to restore the single node backup to the GitLab cluster but it give me the following error :-

[root@gitlab-server ~]# gitlab-backup restore 1613532569_2021_02_17_13.8.4_gitlab_backup.tar
Non tarred backup found in /var/opt/gitlab/backups, using that
GitLab version mismatch:
  Your current GitLab version (13.8.4) differs from the GitLab version in the backup!
  Please switch to the following version and try again:
  version: 13.7.1

Hint: git checkout v13.7.1

I searched for any method of migration and couldn’t find any.
Could anyone help me please?

Thank you

Hi. You can only restore backup to the same version installed. So it means gitlab 13.7.1 needs to be installed to restore an old backup since your backup is from 13.7.1 and not 13.8.4.

i upgraded both versions again to 13.9.1 and i was able to backup and restore to the cluster but was faced with same error for all repositories :-

[Failed] restoring asaad/mci-e2e-mobile (@hashed/f6/4f/f64f410744d9470ffe2d6b9ee6f042cdffcc42a745d2568146e8782ea828ff48)
Error storage not found: "external"

the single node has external storage called “/gitlab-repo”
I done the same on all my gitaly servers and added them to gitlab.rb configuration as shown

git_data_dirs({
  "gitaly-1" => {
    #"path" => "/var/opt/gitlab/git-data"
    "default" => { "path" => "/var/opt/gitlab/git-data" },
    "external" => { "path" => "/gitlab-repo" }
  },
  "gitaly-2" => {
    #"path" => "/var/opt/gitlab/git-data"
    "default" => { "path" => "/var/opt/gitlab/git-data" },
    "external" => { "path" => "/gitlab-repo" }
  },
  "gitaly-3" => {
    #"path" => "/var/opt/gitlab/git-data"
    "default" => { "path" => "/var/opt/gitlab/git-data" },
    "external" => { "path" => "/gitlab-repo" }
  }
})

As for the praefect server, I modified the gitaly configuration to include that as well

praefect['virtual_storages'] = {
  'default' => {
    'gitaly-1' => {
      'address' => 'tcp://gitaly01.sumerge.com:8075',
      'token'   => 'GJeFleoMsaruhScsMXUA',
      "default" => { "path" => "/var/opt/gitlab/git-data" },
      "external" => { "path" => "/gitlab-repo" }

    },
    'gitaly-2' => {
      'address' => 'tcp://gitaly02.sumerge.com:8075',
      'token'   => 'GJeFleoMsaruhScsMXUA',
      "default" => { "path" => "/var/opt/gitlab/git-data" },
      "external" => { "path" => "/gitlab-repo" }

    },
    'gitaly-3' => {
      'address' => 'tcp://gitaly03.sumerge.com:8075',
      'token'   => 'GJeFleoMsaruhScsMXUA',
      "default" => { "path" => "/var/opt/gitlab/git-data" },
      "external" => { "path" => "/gitlab-repo" }

    }
  }
}

any idea how to fix that ?