Backup / Restore Errors and Warnings
I've reproduced this issue in multiple environments, the simplest of which is a clean CentOS 7 (Minimal) installation with GitLab 8.5.1 installed via the Omnibus package using yum. The GitLab instance is very clean, with 2 empty groups created. That said, I first ran into this issue on a GitLab 8.4.2 server with many groups and repositories.
The first set of errors and warnings occur when running the below command:
gitlab-rake gitlab:backup:restore BACKUP=1456353404
Among the output from the database statements being executed are the following errors and warnings:
ERROR: must be owner of extension plpgsql
ERROR: must be owner of schema public
ERROR: schema "public" already exists
ERROR: must be owner of schema public
ERROR: must be owner of extension plpgsql
WARNING: no privileges could be revoked for "public"
WARNING: no privileges could be revoked for "public"
WARNING: no privileges were granted for "public"
WARNING: no privileges were granted for "public"
After the restore completes, I run the following command:
gitlab-rake gitlab:check SANITIZE=true
The following error occurs:
Repo base access is drwxrws---? ... no
Try fixing it:
sudo chmod -R ug+rwX,o-rwx /var/opt/gitlab/git-data/repositories
sudo chmod -R ug-s /var/opt/gitlab/git-data/repositories
sudo find /var/opt/gitlab/git-data/repositories -type d -print0 | sudo xargs -0 chmod g+s
For more information see:
doc/install/installation.md in section "GitLab Shell"
Please fix the error above and rerun the checks.
After running the suggested commands and then re-running the gitlab:check, it completes successfully without any warnings.
What is the cause of these errors/warnings and how can I resolve them? This is happening with out of the box GitLab, with no customizations or changes to the config.
I've attached the full list of commands and output from my session.
Thanks!