Gitlab migration requires the same version migration, and the following prompt will appear during the recovery process:
WARNING: no privileges were granted for "public"
Solution:
1. Edit /var/opt/gitlab/postgresql/data/postgresql.conf
find listen_addresses = ''
Modify to listen_addresses = '*'
2. Edit /var/opt/gitlab/postgresql/data/pg_hba.conf
Add the following two lines at the end of the file:
local all all trust
host all all 127.0.0.1/32 trust
3. Restart gitlab
gitlab-ctl restart
4. Connect to postgresql to authorize gitlab user
cd /opt/gitlab/embedded/bin
su gitlab-psql
./psql -h 127.0.0.1 gitlabhq_production
ALTER USER gitlab WITH SUPERUSER;
\q
5. Execute the gitlab restore operation again