pachooks
pachooks copied to clipboard
Use pre/post snapshots with snapper
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 ...
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?