Skip to content

Support Incremental backups in the backup-utility CNG script

Summary

GitLab as of 14.10 has supported (via the incremental_repository_backup Feature Flag) incremental backups: gitlab-org/gitlab#351383 (closed) However, because GitLab CNG is used to wrap the gitlab:backup:db:create and gitlab:backup:repo:create rake tasks (rather than using the Omnibus gitlab-backup tool which passes flags through), it will need a way to set this flag itself, and perhaps handle the logic of getting the previous backup timestamp and creating an incremental backup that can then be uploaded to the configured storage provider.

Proposal

  • Create a new flag for the backup-utility command that sets the INCREMENTAL=yes flag (such as --incremental?) to Rake and document that in the CLI help
  • If needed, handle the logic for getting the previous full backup timestamp and pass this via the PREVIOUS_BACKUP=<timestamp> flag to Rake
  • Document this functionality under the GitLab Cloud-Native Backup docs