Stop overwriting the backup when creating incremental backups
Release notes
Problem to solve
When creating an incremental repository backup you need to specify which backup will be used to create a differential from. This is done using the BACKUP
env var. Once specified, this backup is untar'd into the backup staging area where the incremental repository backup can be written.
Once this is completed, the same BACKUP
var is used to re-create the backup tar file, overwriting the original backup.
This may be causing issues with backup file pruning since no newly named archive is created https://docs.gitlab.com/ee/raketasks/backup_restore.html#limit-backup-lifetime-for-local-files-prune-old-backups
Proposal
Use the newly introduced INCREMENTAL
variable to specify which backup to unpack to create the differential from.
For example:
sudo gitlab-backup create BACKUP=new_backup INCREMENTAL=previous_backup
In order to maintain compatibility with INCREMENTAL=on
we should only use this var to unpack a backup if it doesn't parse as a boolean. The following will still unpack and overwrite new_backup
:
sudo gitlab-backup create BACKUP=new_backup INCREMENTAL=on
For gitaly-backup
to maintain its own filesystem it needs to know which backup was the original full backup. This original full backup name will need to be stored within backup_information.yml
for this purpose.
Intended users
Feature Usage Metrics
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.