2

If I create a snapshot of root with: btrfs subvolume snapshot -r / /snapshot-$(date +%s)

I can then see this snapshot with ls /

How do I make snapshots that are isolated from the volume that they were created for?

1

So how I opted to do this was by editing the root subvolume (0):

  1. Mount the root subvolume: mount -t btrfs -o subvolid=0 /dev/sdXX /mnt
  2. Created the snapshot subvolume: cd /mnt; btrfs subvolume create @snapshots

Did a preliminary ls / and noticed I didn't see the subvolume; great, now onto next step; a test!

To create isolated snapshots that aren't visible from the original subvolume mount the created subvolume (@snapshot), create the snapshot, and then unmount it.

  1. Mount the snapshot subvolume; get the subvolume ID with btrfs subvolume list / and then mount it: mount -t btrfs -o subvolid=<id> /dev/sdXX /mnt
  2. Create the snapshot of / into /mnt with: btrfs subvolume snapshot -r / /mnt/snapshot_$(date +%s)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy