Creating Snapshots of the root File System

Creating snapshots of a Btrfs root file system is no different to creating a snapshot of any other subvolume, but to keep snapshots separated from the root subvolume, we store them at the top level of the file system.
  1. Mount the top-level subvolume ID on a suitable mount point.
    sudo mount -o subvolid=5 /dev/sda2 /mnt
  2. Create a directory in the file system to store any snapshots, if this doesn't already exist.
    sudo mkdir -p /mnt/.snapshots
  3. Take a snapshot of the file system.
    sudo btrfs subvolume snapshot / /mnt/.snapshots/root_snapshot_1
  4. Unmount the top level of the file system.
    sudo umount /mnt 
  5. Verify that the list of subvolumes includes the newly created snapshot.
    sudo btrfs subvolume list /
    ID 256 gen 1332 top level 5 path boot
    ID 258 gen 1349 top level 5 path root
    ID 259 gen 1309 top level 5 path home
    ID 261 gen 1309 top level 258 path var/lib/portables
    ID 264 gen 1348 top level 5 path .snapshots/root_snapshot_1