#2 Graciously deal with double backup
Closed: Fixed Opened by netvor.

It's not clear to me what should be the behavior, but currently if one calls

jat__filebackup -n foo /some/file
jat__filerestore -n foo
jat__filebackup -n foo /some/file

the latter backup throws error:

test.ERROR: already backed up, giving up: (NS=foo) /some/file

Possible solutions:

  • (A) Always overwrite backup silently.
  • (B) Have jat__filerestore() clear old backup (maybe unless option is passed).
  • (C) Have jat__filerestore() mark old backup as "used" which would let
    jat__filebackup() overwrite it silently.
  • (D) Keep it as it is.

Metadata Update from @netvor:
- Issue status updated to: Open (was: Closed)

Metadata Update from @netvor:
- Issue assigned to netvor

Commit 4f40d42 fixes this issue.

Solution (C) has been chosen: It's somewhat backwards-compatible with beakerlib in the sense that in normal cases, backup is just overwritten (with a subtle hint in the info message). However, when backup is clobbered without ever using it, user is warned; it's is hard to imagine that being an intended usage, probably it just means something in the test logic is broken or unnecessary.

Metadata