What packages do I need to have installed so that snapshots are made by snapper?
You always need this package:
If you use YaST2 to install, update or remove packages and want to have snapper automatically create snapshots when you use this tool:
If you use zypper to install, update or remove packages and want to have snapper automatically create snapshots when you use this tool:
If you want to have the ability for advanced btfs snapshot boot menu management:
WARNING: the above packages are not always installed by default. What gets installed depends on what choices you make during the openSUSE installation process. Make sure you have the appropriate (usually that means all) packages listed above installed before making changes to your system, otherwise you may be in for a surprise when snapper does not automatically create snapshots you thought it would.
How do I enable snapshots for my /home file system?
You will have to create a snapper config for /home by calling:
snapper -c home create-config /home
Then open the file with your config in an editor, /etc/snapper/configs/home, and go through the settings. Notably adjust values for the following:
TIMELINE_CREATE - whether hourly snapshots should be created TIMELINE_LIMIT_HOURLY - how many hourly snapshots the timeline cleanup algorithm should keep TIMELINE_LIMIT_DAILY - dtto daily snapshots TIMELINE_LIMIT_MONTHLY - dtto monthly TIMELINE_LIMIT_YEARLY - dtto yearly
The default values may not fit your usecase and the settings should be adjusted for the expected frequency and amount of changed data on the filesystem.
For example, for Factory development, the MONTHLY and YEARLY settings do not make much sense and should be set to 0. Otherwise the snapshots will exhaust the available space and package update may fail. Reasonable value for HOURLY is between 10 and 24 (these get cleaned frequently) and up to 7 for DAILY.
Why does snapper never show changes in /var/log?
For some directories we decided to disable snapshotting, e.g. /var/log since reverting logs makes searching for problems difficult. To exclude a path from snapshotting we create a subvolume for that path. You can see all subvolumes of / by calling "btrfs subvolume list /".
Does snapper support ext4?
Yes, but only experimental and you need a special kernel and e2fsprogs. For more information see the next4 project.
Does snapper support LVM?
Since version 0.0.12 snapper can handle LVM snapshots with thin-provisioning.
My system has high I/O load after running YaST or zypper. What can I do?
When running YaST or zypper snapper creates two snapshots and compares them. This comparison can cause high I/O load.
Since snapper version 0.0.10 you can disable the background comparisons in the config file /etc/snapper/configs/root by setting:
Now you might also want to disable cleanup of empty pre-post snapshot pairs since otherwise the daily cleanup can cause high I/O.
I'm not using openSUSE. Can I still use snapper?
I didn't install my system with YaST. How do I get started?
After you have installed snapper packages you will have to create a config for your root filesystem by calling:
snapper create-config /
Then continue with the tutorial.
How do I add pre and post hooks (like YaST)?
You will have to insert two calls to snapper in your program or script. In the first call use the option --print-number, remember the value and pass it on to the second call. Have a look at /sbin/yast2 to see how this can be done in bash or at /usr/lib/zypp/plugins/commit/snapper.py for python.
Since snapper version 0.0.9 you can also provide a command to snapper and snapper will create pre and post snapshots running the command in between, e.g.:
snapper create --command "make install" --description "install mplayer"
Does snapper really revert everything?
Snapper will revert all files (text and binary) including permissions and ownership, also remove and recreate files and directories. File timestamps are not reverted. Some files are excluded, e.g. /etc/mtab.
It's recommended to always use the status command to see in advance what files snapper will process.