btrfs snapshot send howto?

Juan Orti Alcaine j.orti.alcaine at gmail.com
Thu Jan 16 15:14:01 UTC 2014


2014/1/16 Neal Becker <ndbecker2 at gmail.com>:
> Trying to follow the example in this article:
>
> http://arstechnica.com/information-technology/2014/01/bitrot-and-atomic-cows-inside-next-gen-filesystems/3/
>
> [root at nbecker1 nbecker]# btrfs subvolume list /
> ID 256 gen 563294 top level 5 path home
> ID 258 gen 563294 top level 5 path root
> ID 370 gen 563278 top level 5 path home/.snapshots
> ID 371 gen 563279 top level 5 path home/.snapshots/01162014
>
> [root at nbecker1 nbecker]# btrfs send /home/.snapshots/01162014 > /dev/null
> At subvol /home/.snapshots/01162014
> ERROR: open home/.snapshots/01162014 failed. No such file or directory
>
> OK, I have no clue why this doesn't work.
>


I'm not sure about the snapshots-inside-a-subvolume thing. I have the
root (subvolid=0) mounted in /mnt/btrfs and take there the snapshots,
so they are not nested:

# btrfs sub list /mnt/btrfs
ID 284 gen 15086 top level 5 path root
ID 1032 gen 12751 top level 5 path root at 2014-01-14_23:45:01
ID 1033 gen 12777 top level 5 path root at 2014-01-15_07:45:01
ID 1034 gen 12794 top level 5 path root at 2014-01-15_08:00:01
ID 1035 gen 12811 top level 5 path root at 2014-01-15_08:15:01
ID 1036 gen 12829 top level 5 path root at 2014-01-15_08:30:01
ID 1037 gen 12844 top level 5 path root at 2014-01-15_08:45:01
ID 1038 gen 12863 top level 5 path root at 2014-01-15_09:00:01
ID 1039 gen 12880 top level 5 path root at 2014-01-15_09:15:01

Also, to send a subvolume, it must be read-only:

# btrfs sub snapshot -r / /mnt/btrfs/my-ro-root
# btrfs send /mnt/btrfs/my-ro-root

You can later make a read-write snapshot of a read-only one to work with it.

-- 
Juan Orti

GPG Key: DEEBD08B - http://jorti.fedorapeople.org/pubkey.asc

Blog: https://apuntesderoot.wordpress.com/


More information about the users mailing list