From 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Feb 2023 13:49:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-9-stable-ee --- doc/raketasks/backup_gitlab.md | 8 ++++---- doc/raketasks/backup_restore.md | 8 +++++--- doc/raketasks/cleanup.md | 2 +- doc/raketasks/import.md | 4 ++-- doc/raketasks/index.md | 3 ++- doc/raketasks/restore_gitlab.md | 21 +++++++++++++++++---- 6 files changed, 31 insertions(+), 15 deletions(-) (limited to 'doc/raketasks') diff --git a/doc/raketasks/backup_gitlab.md b/doc/raketasks/backup_gitlab.md index ffa67c6b4a9..d63ef61a99f 100644 --- a/doc/raketasks/backup_gitlab.md +++ b/doc/raketasks/backup_gitlab.md @@ -216,7 +216,7 @@ To ensure the generated archive is transferable by rsync, you can set the `GZIP_ option. This sets the `--rsyncable` option to `gzip`, which is useful only in combination with setting [the Backup filename option](#backup-filename). -Note that the `--rsyncable` option in `gzip` isn't guaranteed to be available +The `--rsyncable` option in `gzip` isn't guaranteed to be available on all distributions. To verify that it's available in your distribution, run `gzip --help` or consult the man pages. @@ -241,8 +241,6 @@ You can exclude specific directories from the backup by adding the environment v - `repositories` (Git repositories data) - `packages` (Packages) -All wikis are backed up as part of the `repositories` group. Non-existent wikis are skipped during a backup. - NOTE: When [backing up and restoring Helm Charts](https://docs.gitlab.com/charts/architecture/backup-restore.html), there is an additional option `packages`, which refers to any packages managed by the GitLab [package registry](../user/packages/package_registry/index.md). For more information see [command line arguments](https://docs.gitlab.com/charts/architecture/backup-restore.html#command-line-arguments). @@ -437,6 +435,8 @@ For Omnibus GitLab packages: # 'use_iam_profile' => true } gitlab_rails['backup_upload_remote_directory'] = 'my.s3.bucket' + # Consider using multipart uploads when file size reaches 100MB. Enter a number in bytes. + # gitlab_rails['backup_multipart_chunk_size'] = 104857600 ``` 1. [Reconfigure GitLab](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) @@ -468,7 +468,7 @@ gitlab_rails['backup_upload_storage_options'] = { ##### SSE-KMS -To enable SSE-KMS, you'll need the +To enable SSE-KMS, you need the [KMS key via its Amazon Resource Name (ARN) in the `arn:aws:kms:region:acct-id:key/key-id` format](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html). Under the `backup_upload_storage_options` configuration setting, set: diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 796cb71321a..a13d38a199d 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -761,7 +761,9 @@ Backup failed If this happens, examine the following: -- Confirm there is sufficient disk space for the Gzip operation. +- Confirm there is sufficient disk space for the Gzip operation. It's not uncommon for backups that + use the [default strategy](backup_gitlab.md#backup-strategy-option) to require half the instance size + in free disk space during backup creation. - If NFS is being used, check if the mount option `timeout` is set. The default is `600`, and changing this to smaller values results in this error. @@ -811,7 +813,7 @@ You must truncate the files referenced by the database that are causing the prob - In the `uploads` table. - In the references found. Any reference found from other database tables and columns. -- On the filesystem. +- On the file system. Truncate the filenames in the `uploads` table: @@ -979,7 +981,7 @@ Truncate the filenames in the references found: 1. Replace those long filenames using the new filenames obtained from querying the `uploads` table. -Truncate the filenames on the filesystem. You must manually rename the files in your filesystem to the new filenames obtained from querying the `uploads` table. +Truncate the filenames on the file system. You must manually rename the files in your file system to the new filenames obtained from querying the `uploads` table. #### Re-run the backup task diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md index 60c81b26c05..073a0351ec5 100644 --- a/doc/raketasks/cleanup.md +++ b/doc/raketasks/cleanup.md @@ -45,7 +45,7 @@ By default, this task does not delete anything but shows how many file reference delete. Run the command with `DRY_RUN=false` if you actually want to delete the references. You can also use `LIMIT={number}` parameter to limit the number of deleted references. -Note that this Rake task only removes the references to LFS files. Unreferenced LFS files are garbage-collected +This Rake task only removes the references to LFS files. Unreferenced LFS files are garbage-collected later (once a day). If you need to garbage collect them immediately, run `rake gitlab:cleanup:orphan_lfs_files` described below. diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index 05c51fa06d8..5ab62215570 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -23,7 +23,7 @@ migrate projects using either: - [Direct transfer](../user/group/import/index.md#migrate-groups-by-direct-transfer-recommended). - [An export file](../user/project/settings/import_export.md). -Note that: +When you import a repository: - The owner of the project is the first administrator. - The groups are created as needed, including subgroups. @@ -159,7 +159,7 @@ project.set_full_path ``` In a Rails console session, run the following to migrate all of a namespace's -projects (this may take a while if there are 1000s of projects in a namespace): +projects (this may take a while if there are thousands of projects in a namespace): ```ruby namespace = Namespace.find_by_full_path('gitlab-org') diff --git a/doc/raketasks/index.md b/doc/raketasks/index.md index 0d5a826b0a1..b5a778d6b74 100644 --- a/doc/raketasks/index.md +++ b/doc/raketasks/index.md @@ -28,8 +28,8 @@ The following Rake tasks are available for use with GitLab: | [General maintenance](../administration/raketasks/maintenance.md) | General maintenance and self-check tasks. | | [Geo maintenance](../administration/raketasks/geo.md) | [Geo](../administration/geo/index.md)-related maintenance. | | [GitHub import](../administration/raketasks/github_import.md) | Retrieve and import repositories from GitHub. | -| [Import repositories](import.md) | Import bare repositories into your GitLab instance. | | [Import large project exports](../development/import_project.md#importing-via-a-rake-task) | Import large GitLab [project exports](../user/project/settings/import_export.md). | +| [Incoming email](../administration/raketasks/incoming_email.md) | Incoming email-related tasks. | | [Integrity checks](../administration/raketasks/check.md) | Check the integrity of repositories, files, LDAP, and more. | | [LDAP maintenance](../administration/raketasks/ldap.md) | [LDAP](../administration/auth/ldap/index.md)-related tasks. | | [List repositories](list_repos.md) | List all GitLab-managed Git repositories on disk. | @@ -38,6 +38,7 @@ The following Rake tasks are available for use with GitLab: | [Project import/export](../administration/raketasks/project_import_export.md) | Prepare for [project exports and imports](../user/project/settings/import_export.md). | | [Sample Prometheus data](generate_sample_prometheus_data.md) | Generate sample Prometheus data. | | [Sidekiq job migration](../administration/sidekiq/sidekiq_job_migration.md) | Migrate Sidekiq jobs scheduled for future dates to a new queue. | +| [Service Desk email](../administration/raketasks/service_desk_email.md) | Service Desk email-related tasks. | | [SMTP maintenance](../administration/raketasks/smtp.md) | SMTP-related tasks. | | [SPDX license list import](spdx.md) | Import a local copy of the [SPDX license list](https://spdx.org/licenses/) for matching [License Compliance policies](../user/compliance/license_compliance/index.md). | | [Repository storage](../administration/raketasks/storage.md) | List and migrate existing projects and attachments from legacy storage to hashed storage. | diff --git a/doc/raketasks/restore_gitlab.md b/doc/raketasks/restore_gitlab.md index c97a71b1b5d..c5bbb38cc37 100644 --- a/doc/raketasks/restore_gitlab.md +++ b/doc/raketasks/restore_gitlab.md @@ -44,10 +44,6 @@ or `/home/git/gitlab/config/gitlab.yml` (for installations from source) and any TLS keys, certificates (`/etc/gitlab/ssl`, `/etc/gitlab/trusted-certs`), or [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079). -Starting with GitLab 12.9, if an untarred backup (like the ones made with -`SKIP=tar`) is found, and no backup is chosen with `BACKUP=`, the -untarred backup is used. - Depending on your case, you might want to run the restore command with one or more of the following options: @@ -383,3 +379,20 @@ For example, to restore all repositories for all projects in **Group A** (`group ```shell sudo -u git -H bundle exec rake gitlab:backup:restore BACKUP=timestamp_of_backup REPOSITORIES_PATHS=group-a,group-b/project-c ``` + +### Restore untarred backups + +If an [untarred backup](backup_gitlab.md#skipping-tar-creation) (made with `SKIP=tar`) is found, +and no backup is chosen with `BACKUP=`, the untarred backup is used. + +For example, for Omnibus GitLab installations: + +```shell +sudo gitlab-backup restore +``` + +For example, for installations from source: + +```shell +sudo -u git -H bundle exec rake gitlab:backup:restore +``` -- cgit v1.2.3