openSUSE:Snapper install

Jump to: navigation, search

Snapper install

This manual explains howto install and configure snapper step-by-step during installation of openSUSE 11.4.

  • Start openSUSE 11.4 installation. Instruct YaST to sleep after partitioning by providing the parameter to linuxrc:
 YAST2_STORAGE_SLEEP_AFTER_COMMIT=300
  • Create partitioning setup with:
 swap (if you want)
 /boot with ext4
 / with btrfs
  • After partitioning YaST will sleep for 300 seconds. During that time switch to a console or start a xterm. Run the commands:
 mkdir /mnt/var
 btrfsctl -S log /mnt/var
 btrfsctl -S run /mnt/var
 btrfsctl -S tmp /mnt
 btrfsctl -S home /mnt
 killall sleep
 mount -o remount,rw /
 ln /bin/true /sbin/fsck.btrfs
  • Add repository home:aschnell, e.g.:
 zypper ar -c -f -n "aschnell (openSUSE-11.4)" http://download.opensuse.org/repositories/home:/aschnell/openSUSE_11.4/ aschnell
  • Install packages:
 zypper in -r "aschnell" snapper btrfs-progs yast2-2.21.0 yast2-snapper
  • Create a subvolume for snapshots:
 btrfs subvolume create /snapshots
  • Setup configuration:
 cp /usr/share/doc/packages/snapper/example-config /etc/snapper/configs/root
 Add "root" to SNAPPER_CONFIGS in /etc/sysconfig/snapper.

Now snapper should be ready for use.

If you also want to use snapper for /home create a btrfs subvolume /home/snapshots, create and edit the file /etc/snapper/configs/home and add "home" to SNAPPER_CONFIGS in /etc/sysconfig/snapper.

See also