Move GitLab CE docker to another server using backup / restore leads to "permission denied"

Hi all,

since days I try to move my docker hosted GitLab CE to a new docker host.

Therefore I create a backup on the old docker host using GitLab commands.

Then I transfer the backup TAR to the new server.

Then I create a new docker container where I mount all host volumes but an empty “data” folder. The “config” is used from the old server.

Then I restore the backup using GitLab commands.

Then I run several commands to fix permissions:

chown -R root:root /srv/gitlab
setfacl -R -b /srv/gitlab/
setfacl -R -m default:group:docker:rwx /srv/gitlab/
setfacl -R -m group:docker:rwx,default:group:docker:rwx /srv/gitlab/
setfacl -R -m mask::rwx,default:mask::rwx /srv/gitlab

docker exec gitlab update-permissions
docker exec gitlab chown -R gitlab:gitlab /var/opt/gitlab

But I always get this error in the log:

==> /var/log/gitlab/postgres-exporter/current <==
2020-12-08_23:27:03.55885 time="2020-12-08T23:27:03Z" level=error msg="Error opening connection to database (host=/var/opt/gitlab/postgresql%!u(MISSING)ser=gitlab-psql%!d(MISSING)atabase=gitlabhq_production): dial unix /var/opt/gitlab/postgresql/.s.PGSQL.5432: connect: no such file or directory" source="postgres_exporter.go:1474"

==> /var/log/gitlab/postgresql/current <==
2020-12-08_23:27:03.69710 2020-12-08 23:27:03.697 GMT [15292] LOG:  skipping missing configuration file "/var/opt/gitlab/postgresql/data/postgresql.auto.conf"
2020-12-08_23:27:03.69744 postgres: could not find the database system
2020-12-08_23:27:03.69745 Expected to find it in the directory "/var/opt/gitlab/postgresql/data",
2020-12-08_23:27:03.69745 but could not open file "/var/opt/gitlab/postgresql/data/global/pg_control": Permission denied

Any ideas ?

Thank you!