5.12.8 Creating Snapshots of the root File System

To take a snapshot of the current root file system:

  1. Mount the top level of the root file system on a suitable mount point.

    # mount -o subvolid=5 /dev/mapper/vg_btrfs-lv_root /mnt
  2. Change directory to the mount point and take the snapshot. In this example, the install subvolume is currently mounted as the root file system system.

    # cd /mnt
    # btrfs subvolume snapshot install root_snapshot_1
    Create a snapshot of 'install' in './root_snapshot_1'
  3. Change directory to / and unmount the top level of the file system.

    # cd /
    # umount /mnt 

    The list of subvolumes now includes the newly created snapshot.

    # btrfs subvolume list / 
    ID 258 top level 5 path install
    ID 260 top level 5 path root_snapshot_1