gitlab-omnibus restore issues one ERROR and four WARNINGs related to psql
When restoring gitlab, the following ERROR and WARNINGS are issued:
psql:/var/opt/gitlab/backups/db/database.sql:22: ERROR: must be owner of extension plpgsql
psql:/var/opt/gitlab/backups/db/database.sql:2931: WARNING: no privileges could be revoked for "public" (two occurences)
psql:/var/opt/gitlab/backups/db/database.sql:2933: WARNING: no privileges were granted for "public" (two occurences)
This is what I did:
-
Installed gitlab_7.8.4-omnibus-1_amd64.deb on Ubuntu 14.04 server 64-bit.
-
Signed up for an account and confirmed.
-
Created a test project with a README.md and a home page in the wiki, all via the web interface.
-
Backed up:
$ sudo gitlab-rake gitlab:backup:create Dumping database ... Dumping PostgreSQL database gitlabhq_production ... [DONE] done Dumping repositories ... * janne/test ... [DONE] * janne/test.wiki ... [DONE] done Dumping uploads ... done Creating backup archive: 1426587404_gitlab_backup.tar ... done Uploading backup archive to remote storage ... skipped Deleting tmp directories ... done Deleting old backups ... skipping $
-
Restored:
$ sudo gitlab-ctl stop unicorn ok: down: unicorn: 0s, normally up $ sudo gitlab-ctl stop sidekiq ok: down: sidekiq: 0s, normally up $ sudo gitlab-rake gitlab:backup:restore BACKUP=1426587404 [sudo] password for janne: ****** Unpacking backup ... done Restoring database ... Restoring PostgreSQL database gitlabhq_production ... SET SET SET SET SET CREATE EXTENSION psql:/var/opt/gitlab/backups/db/database.sql:22: ERROR: must be owner of extension plpgsql SET SET SET CREATE TABLE ALTER TABLE CREATE SEQUENCE <lines removed> CREATE INDEX CREATE INDEX CREATE INDEX psql:/var/opt/gitlab/backups/db/database.sql:2931: WARNING: no privileges could be revoked for "public" REVOKE psql:/var/opt/gitlab/backups/db/database.sql:2932: WARNING: no privileges could be revoked for "public" REVOKE psql:/var/opt/gitlab/backups/db/database.sql:2933: WARNING: no privileges were granted for "public" GRANT psql:/var/opt/gitlab/backups/db/database.sql:2934: WARNING: no privileges were granted for "public" GRANT [DONE] done Restoring repositories ... * janne/test ... [DONE] * janne/test.wiki ... [DONE] Put GitLab hooks in repositories dirs [DONE] done Restoring uploads ... done This will rebuild an authorized_keys file. You will lose any data stored in authorized_keys file. Do you want to continue (yes/no)? yes Deleting tmp directories ... done $
My gitlab.rb looks like this:
external_url 'https://my.domain:8443'
nginx['custom_gitlab_server_config'] = 'ssl_client_certificate /etc/ssl/certs/my.ca.pem;
ssl_verify_client on;'
nginx['ssl_certificate'] = '/etc/ssl/certs/my.localhost.crt'
nginx['ssl_certificate_key'] = '/etc/ssl/private/my.localhost.key'
I could not run the GitLab Application Check. It seems that it does not apply to gitlab-omnibus:
$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
sudo: bundle: command not found
$