diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /doc/administration/backup_restore | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'doc/administration/backup_restore')
-rw-r--r-- | doc/administration/backup_restore/backup_gitlab.md | 34 | ||||
-rw-r--r-- | doc/administration/backup_restore/index.md | 4 | ||||
-rw-r--r-- | doc/administration/backup_restore/restore_gitlab.md | 20 |
3 files changed, 51 insertions, 7 deletions
diff --git a/doc/administration/backup_restore/backup_gitlab.md b/doc/administration/backup_restore/backup_gitlab.md index dc0724dc561..cd65bf67638 100644 --- a/doc/administration/backup_restore/backup_gitlab.md +++ b/doc/administration/backup_restore/backup_gitlab.md @@ -160,9 +160,9 @@ GitLab uses Redis both as a cache store and to hold persistent data for our back Elasticsearch is an optional database for advanced search. It can improve search in both source-code level, and user generated content in issues, merge requests, and discussions. The [backup command](#backup-command) does _not_ back up Elasticsearch data. Elasticsearch data can be regenerated from PostgreSQL data after a restore. It is possible to [manually back up Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html). -## Command line interface +## Command-line interface -GitLab provides a command line interface to back up your entire instance, +GitLab provides a command-line interface to back up your entire instance, including: - Database @@ -301,7 +301,7 @@ the timestamp is `1493107454_2018_04_25_10.6.4-ce`. ### Backup options -The command line tool GitLab provides to back up your instance can accept more +The command-line tool GitLab provides to back up your instance can accept more options. #### Backup strategy option @@ -435,6 +435,34 @@ sudo -u git -H bundle exec rake gitlab:backup:create SKIP=tar RAILS_ENV=producti ::EndTabs +#### Create server-side repository backups + +> [Introduced](https://gitlab.com/gitlab-org/gitaly/-/issues/4941) in GitLab 16.3. + +Instead of storing large repository backups in the backup archive, repository +backups can be configured so that the Gitaly node that hosts each repository is +responsible for creating the backup and streaming it to object storage. This +helps reduce the network resources required to create and restore a backup. + +1. [Configure a server-side backup destination in Gitaly](../gitaly/configure_gitaly.md#configure-server-side-backups). +1. Create a back up using the `REPOSITORIES_SERVER_SIDE` variable. See the following examples. + +::Tabs + +:::TabTitle Linux package (Omnibus) + +```shell +sudo gitlab-backup create REPOSITORIES_SERVER_SIDE=true +``` + +:::TabTitle Self-compiled + +```shell +sudo -u git -H bundle exec rake gitlab:backup:create REPOSITORIES_SERVER_SIDE=true +``` + +::EndTabs + #### Back up Git repositories concurrently > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37158) in GitLab 13.3. diff --git a/doc/administration/backup_restore/index.md b/doc/administration/backup_restore/index.md index 824fa56f443..56f080a5f9f 100644 --- a/doc/administration/backup_restore/index.md +++ b/doc/administration/backup_restore/index.md @@ -107,7 +107,7 @@ To prepare the new server: ``` 1. Disable periodic background jobs: - 1. On the left sidebar, expand the top-most chevron (**{chevron-down}**). + 1. On the left sidebar, select **Search or go to**. 1. Select **Admin Area**. 1. On the left sidebar, select **Monitoring > Background Jobs**. 1. Under the Sidekiq dashboard, select **Cron** tab and then @@ -188,7 +188,7 @@ To prepare the new server: 1. [Restore the GitLab backup](#restore-gitlab). 1. Verify that the Redis database restored correctly: - 1. On the left sidebar, expand the top-most chevron (**{chevron-down}**). + 1. On the left sidebar, select **Search or go to**. 1. Select **Admin Area**. 1. On the left sidebar, select **Monitoring > Background Jobs**. 1. Under the Sidekiq dashboard, verify that the numbers diff --git a/doc/administration/backup_restore/restore_gitlab.md b/doc/administration/backup_restore/restore_gitlab.md index 784a8708de6..c7439a88661 100644 --- a/doc/administration/backup_restore/restore_gitlab.md +++ b/doc/administration/backup_restore/restore_gitlab.md @@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Restore GitLab **(FREE SELF)** -GitLab provides a command line interface to restore your entire installation, +GitLab provides a command-line interface to restore your entire installation, and is flexible enough to fit your needs. The [restore prerequisites section](#restore-prerequisites) includes crucial @@ -287,7 +287,7 @@ Each backup archive contains a full self-contained backup, including those creat ## Restore options -The command line tool GitLab provides to restore from backup can accept more +The command-line tool GitLab provides to restore from backup can accept more options. ### Specify backup to restore when there are more than one @@ -450,3 +450,19 @@ For more information, see: - [Having different owners](https://www.postgresql.org/message-id/2039.1177339749@sss.pgh.pa.us). - Stack Overflow: [Resulting errors](https://stackoverflow.com/questions/4368789/error-must-be-owner-of-language-plpgsql). + +### Restoring fails due to Git server hook + +While restoring from backup, you can encounter an error when the following are true: + +- A Git Server Hook (`custom_hook`) is configured using the method for [GitLab version 15.10 and earlier](../server_hooks.md) +- Your GitLab version is on version 15.11 and later +- You created symlinks to a directory outside of the GitLab-managed locations + +The error looks like: + +```plaintext +{"level":"fatal","msg":"restore: pipeline: 1 failures encountered:\n - @hashed/path/to/hashed_repository.git (path/to_project): manager: restore custom hooks, \"@hashed/path/to/hashed_repository/<BackupTimestamp>_<GitLabVersion>-ee/001.custom_hooks.tar\": rpc error: code = Internal desc = setting custom hooks: generating prepared vote: walking directory: copying file to hash: read /mnt/gitlab-app/git-data/repositories/+gitaly/tmp/default-repositories.old.<timestamp>.<temporaryfolder>/custom_hooks/compliance-triggers.d: is a directory\n","pid":3256017,"time":"2023-08-10T20:09:44.395Z"} +``` + +To resolve this, you can update the Git [server hooks](../server_hooks.md) for GitLab version 15.11 and later, and create a new backup. |