Here is an example from my test server now:
root@gitlab:~# cd /var/opt/gitlab/backups/
root@gitlab:/var/opt/gitlab/backups# ls -lha
total 564M
drwx------ 2 git root 4.0K Mar 9 16:56 .
drwxr-xr-x 23 root root 4.0K Mar 3 10:36 ..
-rw------- 1 git git 730K Mar 3 10:34 1677836057_2023_03_03_15.9.1_gitlab_backup.tar
-rw------- 1 git git 563M Mar 9 16:56 1678377364_2023_03_09_15.9.2_gitlab_backup.tar
so you can see similar filename format to yours, the file is owned by git:git and the permissions also the same as yours.
Now I stop puma and sidekiq:
root@gitlab:/var/opt/gitlab/backups# gitlab-ctl stop puma
ok: down: puma: 0s, normally up
root@gitlab:/var/opt/gitlab/backups# gitlab-ctl stop sidekiq
ok: down: sidekiq: 0s, normally up
the rest of Gitlab was left running. Now we start restore:
root@gitlab:/var/opt/gitlab/backups# gitlab-backup restore BACKUP=1678377364_2023_03_09_15.9.2
Transfering ownership of /var/opt/gitlab/gitlab-rails/shared/registry to git
2023-03-10 08:13:54 UTC -- Unpacking backup ...
2023-03-10 08:13:56 UTC -- Unpacking backup ... done
2023-03-10 08:13:56 UTC -- Restoring database ...
2023-03-10 08:13:56 UTC -- Be sure to stop Puma, Sidekiq, and any other process that
connects to the database before proceeding. For Omnibus
installs, see the following link for more information:
https://docs.gitlab.com/ee/raketasks/backup_restore.html#restore-for-omnibus-gitlab-installations
Before restoring the database, we will remove all existing
tables to avoid future upgrade problems. Be aware that if you have
custom tables in the GitLab database these tables and all data will be
removed.
Do you want to continue (yes/no)? yes
Removing all tables. Press `Ctrl-C` within 5 seconds to abort
2023-03-10 08:14:12 UTC -- Cleaning the database ...
2023-03-10 08:14:20 UTC -- done
Restoring PostgreSQL database gitlabhq_production ... ERROR: must be owner of extension pg_trgm
ERROR: must be owner of extension btree_gist
ERROR: must be owner of extension btree_gist
ERROR: must be owner of extension pg_trgm
...lots of postgres alter table output...
[DONE]
2023-03-10 08:14:36 UTC -- Restoring database ... done
2023-03-10 08:14:36 UTC -- Restoring repositories ...
{"command":"restore","gl_project_path":"test/test","level":"info","msg":"started restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.git","storage_name":"default","time":"2023-03-10T08:14:37.563Z"}
{"command":"restore","gl_project_path":"test/test","level":"info","msg":"completed restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.git","storage_name":"default","time":"2023-03-10T08:14:37.807Z"}
{"command":"restore","gl_project_path":"test/test.wiki","level":"info","msg":"started restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.wiki.git","storage_name":"default","time":"2023-03-10T08:14:37.858Z"}
{"command":"restore","gl_project_path":"test/test","level":"info","msg":"started restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.design.git","storage_name":"default","time":"2023-03-10T08:14:37.865Z"}
{"command":"restore","error":"manager: repository skipped: restore bundle: filesystem sink: get reader for \"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.design.bundle\": doesn't exist","gl_project_path":"test/test","level":"warning","msg":"skipped restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.design.git","storage_name":"default","time":"2023-03-10T08:14:37.883Z"}
{"command":"restore","gl_project_path":"docker/docker-registry","level":"info","msg":"started restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git","storage_name":"default","time":"2023-03-10T08:14:37.883Z"}
{"command":"restore","gl_project_path":"test/test.wiki","level":"info","msg":"completed restore","relative_path":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.wiki.git","storage_name":"default","time":"2023-03-10T08:14:37.999Z"}
{"command":"restore","gl_project_path":"docker/docker-registry.wiki","level":"info","msg":"started restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.wiki.git","storage_name":"default","time":"2023-03-10T08:14:37.999Z"}
{"command":"restore","error":"manager: repository skipped: restore bundle: filesystem sink: get reader for \"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.wiki.bundle\": doesn't exist","gl_project_path":"docker/docker-registry.wiki","level":"warning","msg":"skipped restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.wiki.git","storage_name":"default","time":"2023-03-10T08:14:38.021Z"}
{"command":"restore","gl_project_path":"docker/docker-registry","level":"info","msg":"started restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.design.git","storage_name":"default","time":"2023-03-10T08:14:38.021Z"}
{"command":"restore","error":"manager: repository skipped: restore bundle: filesystem sink: get reader for \"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.design.bundle\": doesn't exist","gl_project_path":"docker/docker-registry","level":"warning","msg":"skipped restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.design.git","storage_name":"default","time":"2023-03-10T08:14:38.038Z"}
{"command":"restore","gl_project_path":"docker/docker-registry","level":"info","msg":"completed restore","relative_path":"@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git","storage_name":"default","time":"2023-03-10T08:14:38.041Z"}
2023-03-10 08:14:38 UTC -- Restoring repositories ... done
2023-03-10 08:14:38 UTC -- Restoring uploads ...
2023-03-10 08:14:38 UTC -- Restoring uploads ... done
2023-03-10 08:14:38 UTC -- Restoring builds ...
2023-03-10 08:14:38 UTC -- Restoring builds ... done
2023-03-10 08:14:38 UTC -- Restoring artifacts ...
2023-03-10 08:14:38 UTC -- Restoring artifacts ... done
2023-03-10 08:14:38 UTC -- Restoring pages ...
2023-03-10 08:14:38 UTC -- Restoring pages ... done
2023-03-10 08:14:38 UTC -- Restoring lfs objects ...
2023-03-10 08:14:38 UTC -- Restoring lfs objects ... done
2023-03-10 08:14:38 UTC -- Restoring terraform states ...
2023-03-10 08:14:38 UTC -- Restoring terraform states ... done
2023-03-10 08:14:38 UTC -- Restoring container registry images ...
2023-03-10 08:14:44 UTC -- Restoring container registry images ... done
2023-03-10 08:14:44 UTC -- Restoring packages ...
2023-03-10 08:14:44 UTC -- Restoring packages ... done
This task will now rebuild the authorized_keys file.
You will lose any data stored in the authorized_keys file.
Do you want to continue (yes/no)? yes
2023-03-10 08:15:14 UTC -- Deleting tar staging files ...
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/backup_information.yml
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/db
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/repositories
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/uploads.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/builds.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/artifacts.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/pages.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/lfs.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/terraform_state.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/registry.tar.gz
2023-03-10 08:15:14 UTC -- Cleaning up /var/opt/gitlab/backups/packages.tar.gz
2023-03-10 08:15:14 UTC -- Deleting tar staging files ... done
2023-03-10 08:15:14 UTC -- Deleting backups/tmp ...
2023-03-10 08:15:14 UTC -- Deleting backups/tmp ... done
2023-03-10 08:15:14 UTC -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data
and are not included in this backup. You will need to restore these files manually.
2023-03-10 08:15:14 UTC -- Restore task is done.
2023-03-10 09:15:14 +0100 -- Deleting backup and restore lock file
Transfering ownership of /var/opt/gitlab/gitlab-rails/shared/registry to registry
and my system is restored. The only steps to be done now are:
gitlab-ctl reconfigure
gitlab-ctl restart
the postgres errors about btree can be ignored. They are not important. I restored the 15.9.2 backup because that is the version of Gitlab installed. It was also gitlab-ce, omnibus, so providing you have all these requirements, and the file is in /var/opt/gitlab/backups, owned by git:git, and you didn’t stop all gitlab services, then there’s no reason for it to fail. But we would need more info from your environment to ensure this all matches.