diff options
Diffstat (limited to 'doc/raketasks')
-rw-r--r-- | doc/raketasks/README.md | 2 | ||||
-rw-r--r-- | doc/raketasks/backup_restore.md | 34 | ||||
-rw-r--r-- | doc/raketasks/migrate_snippets.md | 2 |
3 files changed, 27 insertions, 11 deletions
diff --git a/doc/raketasks/README.md b/doc/raketasks/README.md index a42bf2a5d91..e119563fd25 100644 --- a/doc/raketasks/README.md +++ b/doc/raketasks/README.md @@ -42,7 +42,7 @@ The following are available Rake tasks: | [Repository storage](../administration/raketasks/storage.md) | List and migrate existing projects and attachments from legacy storage to hashed storage. | | [Uploads migrate](../administration/raketasks/uploads/migrate.md) | Migrate uploads between storage local and object storage. | | [Uploads sanitize](../administration/raketasks/uploads/sanitize.md) | Remove EXIF data from images uploaded to earlier versions of GitLab. | -| [Usage data](../administration/troubleshooting/gitlab_rails_cheat_sheet.md#generate-usage-ping) | Generate and troubleshoot [Usage Ping](../development/product_analytics/usage_ping.md).| +| [Usage data](../administration/troubleshooting/gitlab_rails_cheat_sheet.md#generate-usage-ping) | Generate and troubleshoot [Usage Ping](../development/usage_ping.md).| | [User management](user_management.md) | Perform user management tasks. | | [Webhooks administration](web_hooks.md) | Maintain project Webhooks. | | [X.509 signatures](x509_signatures.md) | Update X.509 commit signatures, useful if certificate store has changed. | 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/). diff --git a/doc/raketasks/migrate_snippets.md b/doc/raketasks/migrate_snippets.md index 8050a8a38e5..244ff4f2b56 100644 --- a/doc/raketasks/migrate_snippets.md +++ b/doc/raketasks/migrate_snippets.md @@ -14,7 +14,7 @@ and users can update it directly through Git. Nevertheless, existing GitLab Snippets have to be migrated to this new functionality. For each snippet, a new repository is created and the snippet content is committed -to the repository inside a file whose name is the file name used in the snippet +to the repository inside a file whose name is the filename used in the snippet as well. GitLab performs this migration through a [Background Migration](../development/background_migrations.md) |