diff options
Diffstat (limited to 'doc/raketasks/backup_restore.md')
-rw-r--r-- | doc/raketasks/backup_restore.md | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 03ffd6bd6ad..8a01975f771 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -61,6 +61,7 @@ including: - Container Registry images - GitLab Pages content - Snippets +- Group wikis **(PREMIUM)** WARNING: GitLab does not back up any configuration files, SSL certificates, or system @@ -890,7 +891,7 @@ Restoring repositories: Deleting tmp directories...[DONE] ``` -Next, restore `/home/git/gitlab/.secret` if necessary, as previously mentioned. +Next, restore `/home/git/gitlab/.secret` if necessary, [as previously mentioned](#restore-prerequisites). Restart GitLab: @@ -943,8 +944,16 @@ permissions on your Registry directory. This is a [known issue](https://gitlab.c On GitLab 12.2 or later, you can use `gitlab-backup restore` to avoid this issue. -Next, restore `/etc/gitlab/gitlab-secrets.json` if necessary, as previously -mentioned. +If there's a GitLab version mismatch between your backup tar file and the +installed version of GitLab, the restore command aborts with an error +message. Install the [correct GitLab version](https://packages.gitlab.com/gitlab/), +and then try again. + +NOTE: +There is a known issue with restore not working with `pgbouncer`. [Read more about backup and restore with `pgbouncer`](#backup-and-restore-for-installations-using-pgbouncer). + +Next, restore `/etc/gitlab/gitlab-secrets.json` if necessary, +[as previously mentioned](#restore-prerequisites). Reconfigure, restart and check GitLab: @@ -954,13 +963,13 @@ sudo gitlab-ctl restart sudo gitlab-rake gitlab:check SANITIZE=true ``` -If there's a GitLab version mismatch between your backup tar file and the -installed version of GitLab, the restore command aborts with an error -message. Install the [correct GitLab version](https://packages.gitlab.com/gitlab/), -and then try again. +On GitLab 13.1 and later, check [database values can be decrypted](../administration/raketasks/doctor.md) +especially if `/etc/gitlab/gitlab-secrets.json` was restored, or if a different server is +the target for the restore. -NOTE: -There is a known issue with restore not working with `pgbouncer`. [Read more about backup and restore with `pgbouncer`](#backup-and-restore-for-installations-using-pgbouncer). +```shell +sudo gitlab-rake gitlab:doctor:secrets +``` ### Restore for Docker image and GitLab Helm chart installations @@ -1068,6 +1077,13 @@ following error message is shown: ActiveRecord::StatementInvalid: PG::UndefinedTable ``` +Each time the GitLab backup runs, GitLab will start generating 500 errors and errors about missing +tables will [be logged by PostgreSQL](../administration/logs.md#postgresql-logs): + +```plaintext +ERROR: relation "tablename" does not exist at character 123 +``` + This happens because the task uses `pg_dump`, which [sets a null search path and explicitly includes the schema in every SQL query](https://gitlab.com/gitlab-org/gitlab/-/issues/23211) to address [CVE-2018-1058](https://www.postgresql.org/about/news/postgresql-103-968-9512-9417-and-9322-released-1834/). |