Skip to content

pruning: grid: fix in 0.3.1 has unexpected destructive consequences for multi job setups #400

@nanaya

Description

@nanaya

So this change:

  • [BUG] pruning: grid: add all snapshots that do not match the regex to the rule’s destroy list. This brings the implementation in line with the docs.

I've been unknowingly relying on the "bug" to have the job only prune snapshots with specified regex in type grid like so:

- name: snap_hourly
  type: snap
  filesystems: {
    "<": true,
  }
  snapshotting:
    type: periodic
    prefix: zrepl_hourly_
    interval: 30m
  pruning:
    keep:
    - type: grid
      regex: "^zrepl_hourly_.*"
      grid: 1x1h(keep=all) | 72x1h

- name: snap_daily
  type: snap
  filesystems: {
    "<": true,
    "mypool/downloads": false,
  }
  snapshotting:
    type: periodic
    prefix: zrepl_daily_
    interval: 10h
  pruning:
    keep:
    - type: grid
      regex: "^zrepl_daily_.*"
      grid: 30x1d

And that seemingly innocent "[bug]" tag changelog managed to clear up my entire snapshots 🙃

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions