pam_snapper8
Pam module which creates filesystem snapshots via "snapper"
Usage
pam_snapper.so [debug]
[homeprefix=prefix]
[ignoreservices=services]
[ignoreusers=users]
[rootasroot]
[ignoreroot]
[openonly]
[closeonly]
[cleanup=algorithm]
Overview
Create a snapshot at every login of a user, thus they always have a safe starting point.
As many users do not logout for some time, it is a good idea to enable snapper's time based snapshots in addition.
Options
debug
Switch on debugging in the module.
homeprefix=prefix
Prefix for the name of the snapper configuration. The username will be appended to this prefix.
Default: "home_"
ignoreservices=comma separated list of services
Default: "crond"
ignoreusers=comma separated list of users
Default: (none)
rootasroot
Perform a snapshot using the snapper configuration "root" if the user "root" logs in. In other words: the homeprefix is not used in this case. As the snapper configuration "root" is used for the system (the root filesystem), this means that with every login of the user "root" the complete "/" filesystem will be snapshotted. This can be useful to help administrators rolling back in case their activity / configuration changes have been accidentally wrong.
"rootasroot" and "ignoreroot" are mutually exclusive.
ignoreroot
No snapshot is taken, if the user "root" opens/closes a session.
"rootasroot" and "ignoreroot" are mutually exclusive.
openonly
Only create a single snapshot when opening the PAM session.
Default: create pre- and post-snapshots
closeonly
Only create a single snapshot when closing the PAM session.
Default: create pre- and post-snapshots
cleanup=cleanup-algorithm
Set snapper cleanup algorithm.
Default: (none)
Module types provided
Only the module type "session" is provided.
Return values
PAM_SUCCESS
pam_snapper will always return PAM_SUCCESS, to not prevent users from login, in case a snapshot fails. This may change in the future.
Examples
Basic usage
1. Create a btrfs subvolume for the new user and a snapper configuration, e.g. using the tool /usr/lib/pam_snapper/pam_snapper_useradd.sh.
2. Add the following line to /etc/pam.d/common-session:
session optional pam_snapper.so
Homepage
http://snapper.io/
Releases
7 releases since Debian 8 (Jessie); the text changed 6 times.