GItLab: Exception during gitlab-backup restore from 18.4.1-ee to 18.4.1-ee
gitlab-backup restore BACKUP=xxxx_2025_10_07_18.4.1-ee 
Transfering ownership of /var/opt/gitlab/gitlab-rails/shared/registry to git
2025-10-07 21:51:31 +0330 -- Unpacking backup ... 
2025-10-07 21:51:47 +0330 -- Unpacking backup ... done
2025-10-07 21:51:47 +0330 -- Restoring database ... 
2025-10-07 21:51:47 +0330 -- 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://x.yyy.com/help/administration/backup_restore/restore_gitlab.md#restore-for-linux-package-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
2025-10-07 21:54:06 +0330 -- Removing all tables. Press `Ctrl-C` within 5 seconds to abort
2025-10-07 21:54:11 +0330 -- Cleaning the database ... 
2025-10-07 21:54:31 +0330 -- done
2025-10-07 21:54:31 +0330 -- 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 amcheck
ERROR:  must be able to SET ROLE "gitlab-psql"
ERROR:  must be owner of extension amcheck
ERROR:  must be owner of extension btree_gist
ERROR:  must be owner of extension pg_trgmSystem information
System:         Ubuntu 24.04
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   3.2.8
Gem Version:    3.7.1
Bundler Version:2.7.1
Rake Version:   13.0.6
Redis Version:  7.2.10
Sidekiq Version:7.3.9
Go Version:     unknown
GitLab information
Version:        18.4.1-ee
Revision:       270836848e7
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     16.10
URL:            
HTTP Clone URL: 
SSH Clone URL: 
Elasticsearch:  yes
Geo:            no
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: openid_connect
GitLab Shell
Version:        14.45.2
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell
Gitaly
- default Address:      unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version:      18.4.1
- default Git Version:  2.50.1Server A
    name    |   schema   | version |    owner    
------------+------------+---------+-------------
 amcheck    | public     | 1.3     | gitlab-psql
 btree_gist | public     | 1.6     | gitlab-psql
 pg_trgm    | public     | 1.6     | gitlab-psql
 plpgsql    | pg_catalog | 1.0     | gitlab-psqlServer B
    name    |   schema   | version |    owner    
------------+------------+---------+-------------
 amcheck    | public     | 1.3     | gitlab-psql
 btree_gist | public     | 1.7     | gitlab-psql
 pg_trgm    | public     | 1.6     | gitlab-psql
 plpgsql    | pg_catalog | 1.0     | gitlab-psqlgitlabhq_production=# ALTER EXTENSION btree_gist UPDATE TO '1.6';
ERROR:  extension "btree_gist" has no update path from version "1.7" to version "1.6"Source server has btree_gist version 1.6, destination has 1.7. This mismatch causes restore failure.
Edited  by Kuri