I think I’m missing a feature. I need a directory which is unique to specific snaps (and users) and does not get preserved. It is something between the way of SNAP_USER_DATA and SNAP_USER_COMMON environment variables.
SNAP_USER_COMMON is not revision specific and do not get backed up and restored
SNAP_USER_DATA is revision specific and do get backed up and restored
I’m searching for something (SNAP_USER_CACHE?) that is revision specific and do not get backed up. HOME could be a good choice, but that’s not changed for classic confinement.
Right now I’m planning to use $SNAP_USER_COMMON/$SNAP_REVISION and try to do the cleanup of abandoned SNAP_REVISION subdirs removed with some external cleanup code.
Am I doing it right?