miracle2k/tarsnapper

expire (and make) "Skipping" expiry of all but the first job if deltas are defined at top level

simonmichael opened this issue · 1 comments

I have a config file defining four jobs. deltas is defined once for all jobs, at the top level. The expire & make commands seem to skip expiry of all but the first job in a run. Eg:

# tarsnapper -c /etc/tarsnapper.conf expire --dry-run
24 backups are matching
3 of those can be deleted
Deleting mail-20190707-082116 mail-20190708-082224 mail-20190709-081501
Skipping 'conf', does not define deltas
Skipping 'apps', does not define deltas
Skipping 'data', does not define deltas

In fact all of these jobs have deletable backups, eg here it is with a different first job (cf #60):

# tarsnapper -c /etc/tarsnapper.conf expire --dry-run
27 backups are matching
5 of those can be deleted
Deleting conf-20190530-084419 conf-20190706-082120 conf-20190707-082044 conf-20190708-081501 conf-20190709-083729
Skipping 'apps', does not define deltas
Skipping 'mail', does not define deltas
Skipping 'data', does not define deltas
zr40 commented

Multiple jobs using the same deltas would reference the same list instance. expire.py mutates this list, causing any following jobs using the same deltas to see an empty list.

I've created a pull request, #64, that fixes this bug.