doc/administration/geo/replication/object_storage.md
{{< details >}}
{{< /details >}}
{{< history >}}
geo_object_storage_verification. Enabled by default.{{< /history >}}
Geo can be used in combination with Object Storage (AWS S3, or other compatible object storage).
Secondary sites can use one of the following:
The storage method (local or object storage) for files is recorded in the database, and the database is replicated from the primary Geo site to the secondary Geo site.
When accessing an uploaded object, we get its storage method (local or object storage) from the database, so the secondary Geo site must match the storage method of the primary Geo site.
Therefore, if the primary Geo site uses object storage, the secondary Geo site must use it too.
To have:
Read more about using object storage with GitLab.
Geo verifies files stored in object storage to ensure data integrity between primary and secondary sites.
[!warning] Disabling object storage verification is not recommended. When you disable the
geo_object_storage_verificationfeature flag, GitLab asynchronously deletes all existing verification state records.
When the geo_object_storage_verification feature flag is disabled:
Geo::VerificationBatchWorker) can still appear in Sidekiq logs, but verification does not take place.{{< history >}}
{{< /history >}}
[!warning] In case of issues, avoid manually deleting individual files as that can lead to data inconsistencies.
Secondary sites can replicate files stored by the primary site regardless of whether they are stored on the local file system or in object storage.
To enable GitLab replication:
For LFS, follow the documentation to set up LFS object storage.
For CI job artifacts, there is similar documentation to configure jobs artifact object storage.
For user uploads, there is similar documentation to configure upload object storage.
If you want to migrate the primary site's files to object storage, you can configure the secondary in a few ways:
If the Allow this secondary site to replicate content on Object Storage setting is disabled, and if you have migrated all your files from local storage to object storage, then many Admin > Geo > Sites progress bars display Nothing to synchronize.
[!warning] To avoid data loss, you should only enable the Allow this secondary site to replicate content on Object Storage setting if you are using separate object stores for the Primary and Secondary sites.
GitLab does not support the case where both:
Data inconsistencies can occur when migrating from local to object storage, which is further described in the object storage troubleshooting section.
When using Amazon S3, you can use Cross-Region Replication (CRR) to have automatic replication between the bucket used by the primary site and the bucket used by secondary sites.
If you are using Google Cloud Storage, consider using Multi-Regional Storage. Or you can use the Storage Transfer Service, although this only supports daily synchronization.
For manual synchronization, or scheduled by cron, see: