FAQ | This is a LIVE service | Changelog

Skip to content

Add --bucket-patch-lifecycle-policy and --retention-period=N options

Dmitrii Unterov requested to merge backup-buckets-retention-policy into master

This merge request introduces a number of changes

  1. Default retention period for buckets == 180 days. (can be tweaked by providing --retention-period=N option)
  2. Optional --bucket-patch-lifecycle-policy flag indicates that existing buckets will be patched.

Options could be used together or separatelly

Examples

  1. gcp-sql-backup without new options - existing buckets will stay untouched, new buckets will be created with lifecycle policy to delete all files older than 180 days.
  2. gcp-sql-backup with --retention-period=200 - existing buckets will stay untouched, new buckets will be created with lifecycle policy to delete all files older than 200 days.
  3. gcp-sql-backup with --bucket-patch-lifecycle-policy - existing buckets will be updated with new policy to delete all files older than 180 days (all other lifecycle rules will be cleared), new buckets will be created with lifecycle policy to delete all files older than 180 days.
  4. gcp-sql-backup with both --bucket-patch-lifecycle-policy and --retention-period=200 - existing buckets will be updated with new policy to delete all files older than 200 days (all other lifecycle rules will be cleared), new buckets will be created with lifecycle policy to delete all files older than 200 days.

Related to https://gitlab.developers.cam.ac.uk/uis/devops/infra/sql-backup/-/issues/17

Edited by Dmitrii Unterov

Merge request reports

Loading