I have a Btrfs partition which has a single subvolume at the top level (/root). It has subvol=root option in /etc/fstab.Every week, I take a readonly snapshot into /root/snapshots/... using:btrfs subvolume snapshot -r / /snapshots/$(date --rfc-3339=date)(paths don't have /root because it's mounted as subvol=root).Now let's say something went wrong and I wanted to restore my root subvolume from a snapshot, I boot from a USB disk and mount the partition as /mnt/disk without subvol=root. If I try to run:btrfs subvolume snapshot /mnt/disk/root/snapshots/2015-05-01 /mnt/disk/rootIt creates the new subvolume as /mnt/disk/root/2015-05-01 instead of replacing /mnt/disk/root/. If I try to delete it first by runningbtrfs subvolume delete /mnt/disk/rootIt gives the error message:ERROR: cannot delete '/mnt/disk/root' - Directory not emptyIs there a way to do this? Or should I get into the habit of creating snapshots outside the subvolume being snapshotted?
Restore Btrfs snapshot from subdirectory to parent
linux;btrfs;snapshot