How to migrate to another gitlab instance without copy any repository and lfs data

for lfs and repository data is huge, it’s very time and disk space cost, so can I migrate to another gitlab instance without copy any repository and lfs data, just specify gitlab_rails[‘lfs_storage_path’] and git_data_dirs to old instance data directory?

I tried

gitlab-backup create SKIP=lfs,repositories
gitlab-backup restore BACKUP=1656138991_2022_06_25_15.1.0 SKIP=lfs,repositories

all works well, except click into project, gitlab said No repository, The repository for this project does not exist.

gitlab-ctl tail:

==> /var/log/gitlab/postgresql/current <==
2022-06-26_05:09:07.90312 LOG:  database system is ready to accept connections
2022-06-26_05:18:22.49805 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.51679 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.51680 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"
2022-06-26_05:18:22.71587 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.71589 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.71589 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"
2022-06-26_05:18:22.75339 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.75340 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.75340 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"


==> /var/log/gitlab/gitaly/current <==
{"correlation_id":"01G6F9DYD4E5D0795G3ZCRRDP3","error":"rpc error: code = NotFound desc = GetRepoPath: not a git repository: \"/data/gitlab_data/repositories/@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git\"","grpc.code":"NotFound","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindDefaultBranchName","grpc.request.deadline":"2022-06-26T13:58:33.003","grpc.request.fullMethod":"/gitaly.RefService/FindDefaultBranchName","grpc.request.glProjectPath":"p2p/AdvanceP2P-ng","grpc.request.glRepository":"project-23383","grpc.request.payload_bytes":129,"grpc.request.repoPath":"@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":0,"grpc.service":"gitaly.RefService","grpc.start_time":"2022-06-26T13:58:23.443","grpc.time_ms":0.134,"level":"info","msg":"finished unary call with code NotFound","peer.address":"@","pid":17883,"remote_ip":"192.168.1.176","span.kind":"server","system":"grpc","time":"2022-06-26T05:58:23.444Z","username":"root"}
{"correlation_id":"01G6F9DYD4E5D0795G3ZCRRDP3","error":"rpc error: code = NotFound desc = GetRepoPath: not a git repository: \"/data/gitlab_data/repositories/@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git\"","grpc.code":"NotFound","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindDefaultBranchName","grpc.request.deadline":"2022-06-26T13:58:33.005","grpc.request.fullMethod":"/gitaly.RefService/FindDefaultBranchName","grpc.request.glProjectPath":"p2p/AdvanceP2P-ng","grpc.request.glRepository":"project-23383","grpc.request.payload_bytes":129,"grpc.request.repoPath":"@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":0,"grpc.service":"gitaly.RefService","grpc.start_time":"2022-06-26T13:58:23.445","grpc.time_ms":0.094,"level":"info","msg":"finished unary call with code NotFound","peer.address":"@","pid":17883,"remote_ip":"192.168.1.176","span.kind":"server","system":"grpc","time":"2022-06-26T05:58:23.445Z","username":"root"}
{"correlation_id":"01G6F9DYD4E5D0795G3ZCRRDP3","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"RepositoryExists","grpc.request.deadline":"2022-06-26T13:58:33.001","grpc.request.fullMethod":"/gitaly.RepositoryService/RepositoryExists","grpc.request.glProjectPath":"p2p/AdvanceP2P-ng","grpc.request.glRepository":"project-23383","grpc.request.payload_bytes":129,"grpc.request.repoPath":"@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":0,"grpc.service":"gitaly.RepositoryService","grpc.start_time":"2022-06-26T13:58:23.451","grpc.time_ms":0.028,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":17883,"remote_ip":"192.168.1.176","span.kind":"server","system":"grpc","time":"2022-06-26T05:58:23.451Z","username":"root"}
{"correlation_id":"01G6F9DYD4E5D0795G3ZCRRDP3","error":"rpc error: code = NotFound desc = GetRepoPath: not a git repository: \"/data/gitlab_data/repositories/@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git\"","grpc.code":"NotFound","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindDefaultBranchName","grpc.request.deadline":"2022-06-26T13:58:33.001","grpc.request.fullMethod":"/gitaly.RefService/FindDefaultBranchName","grpc.request.glProjectPath":"p2p/AdvanceP2P-ng","grpc.request.glRepository":"project-23383","grpc.request.payload_bytes":129,"grpc.request.repoPath":"@hashed/b8/80/b880fb78359a2edbe60ad37a32323979d526064e1d7def5950a1733e139e66f5.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":0,"grpc.service":"gitaly.RefService","grpc.start_time":"2022-06-26T13:58:23.582","grpc.time_ms":0.134,"level":"info","msg":"finished unary call with code NotFound","peer.address":"@","pid":17883,"remote_ip":"192.168.1.176","span.kind":"server","system":"grpc","time":"2022-06-26T05:58:23.582Z","username":"root"}