Skip to content

Feature: Automatically remove old GitLab backups

Summary

Omnibus provides a convenient way to remove old backups periodically: gitlab_rails['backup_keep_time'] = 123456;

There should be something similar for the Helm chart but I cannot find anything in the docs or the backup-job.yaml.

Steps to reproduce

  • configure task-runner backup cron (see below)
  • watch your s3 bucket grow indefinitely

Configuration used

gitlab:
  [...]
  task-runner:
    backups:
      [...]
      cron:
        enabled: true
        schedule: 0 */6 * * *

Current behavior

task-runner-backup Logs:

[...]
[DONE] Backup can be found at s3://some-bucket/1571119216_2019_10_15_12.3.5_gitlab_backup.tar

Expected behavior

The backup-utility should clean up old backup archives depending on the value of backup_keep_time configured in the gitlab/task-runner/backups section.

task-runner-backup Logs:

[...]
[DONE] Backup can be found at s3://some-bucket/1571119216_2019_10_15_12.3.5_gitlab_backup.tar
Deleting old backups...
[DONE] Deleted X old backups.

Versions

  • Chart: 2.3.7
  • Platform:
    • Cloud: AWS EKS
  • Kubernetes:
    • Client: v1.16.1
    • Server: v1.13.10-eks-5ac0f1
  • Helm:
    • Client: v2.14.3
    • Server: v2.14.3
Edited by Jason Plum