Chapter 14. Creating and Maintaining Snapshots with Snapper
14.1. Creating Initial Snapper Configuration
Procedure 14.1. Creating a Snapper Configuration File
- Create or choose either:
- A thinly-provisioned logical volume with a Red Hat supported file system on top of it, or
- A Btrfs subvolume.
- Mount the file system.
- Create the configuration file that defines this volume.For LVM2:
snapper -c config_name create-config -f "lvm(fs_type)" /mount-pointFor example, to create a configuration file called lvm_config on an LVM2 subvolume with an ext4 file system, mounted at /lvm_mount, use:
snapper -c lvm_config create-config -f "lvm(ext4)" /lvm_mountFor Btrfs:
snapper -c config_name create-config -f btrfs /mount-point
Alternatively, to create a configuration file called
-c config_nameoption specifies the name of the configuration file.
create-configtells snapper to create a configuration file.
-f file_systemtells snapper what file system to use; if this is omitted snapper will attempt to detect the file system.
/mount-pointis where the subvolume or thinly-provisioned LVM2 file system is mounted.
btrfs_config, on a Btrfs subvolume that is mounted at
snapper -c btrfs_config create-config -f btrfs /btrfs_mount