Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • gitaly gitaly
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 926
    • Issues 926
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 54
    • Merge requests 54
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitalygitaly
  • Issues
  • #4184
Closed
Open
Issue created Apr 04, 2022 by James Fargher@proglottisMaintainer

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.

Edited Apr 04, 2022 by James Fargher
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking