pachooks icon indicating copy to clipboard operation
pachooks copied to clipboard

Use pre/post snapshots with snapper

Open kbabioch opened this issue 9 years ago • 1 comments

Currently snapshots are created as type "single". However in the context of package upgrades, it is more senseful to use pre/post snapshots, which are logically linked together. snapper also provides different cleanup strategies for these kind of snapshots:

    pre
       Pre snapshots should always have a corresponding post snapshot. The intention of pre/post snapshot pairs is to snapshot the filesystem
       before and after a modification.

   post
       See pre type.

One caveat is that when creating a post snapshot the number of the appropriate pre snapshot has to be provided as argument. Probably it will be easiest to use temporary files (within /tmp?) for this purpose ...

kbabioch avatar Feb 16 '16 15:02 kbabioch

Pre snapshots should always have a corresponding post snapshot.

PostTransaction hooks do not run if the transaction is not completed. What happens to snapper if there is no post snapshot?

andrewgregory avatar Feb 16 '16 19:02 andrewgregory