sudo btrfs subvolume create test cd test nano a.txt cd .. sudo btrfs subvolume snapshot -r test testBackup1 sudo btrfs send testBackup1 > '/media/miguel/btrfs_backup/file1' cd test nano b.txt cd .. sudo btrfs subvolume snapshot -r test testBackup2 sudo btrfs send -p testBackup1 testBackup2 > '/media/miguel/btrfs_backup/file2' sudo btrfs receive '/media/miguel/btrfs_backup/testBtrfsBackups' < '/media/miguel/btrfs_backup/file1' sudo btrfs receive '/media/miguel/btrfs_backup/testBtrfsBackups' < '/media/miguel/btrfs_backup/file2' The last command gives the error: ERROR: open testBtrfsBackups/testBackup1 failed. No such file or directory But the subvolume is there: miguel@miguel-MacBookPro:/media/miguel/btrfs_backup/testBtrfsBackups$ ls -l total 0 drwxr-xr-x 1 miguel miguel 10 Jun 25 09:59 testBackup1 The files file1 and file2 created are attached in case someone want to try doing the receive part. I'm using ubuntu 13.04, 3.8.0-25-lowlatency #17-Ubuntu SMP PREEMPT Sat Jun 8 15:59:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux. Btrfs v0.20-rc1
Created attachment 105961 [details] The files created while test btrfs send and receive
Works for me using the current master branch from btrfs-progs from git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git ./btrfs --version Btrfs v0.20-rc1-335-gf00dd83
OK, fails with v0.20-rc1 (which is from August 2012!), works with the current btrfs-progs v0.20-rc1-335-gf00dd83. Please update your progs.
I have added a bug report in ubuntu bug tracker: https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1195245. I'm quite a linux newbie, so some questions: Is it safe(r) to use the latest version in git ? So to change to the compiled progs, I would have to first uninstall the ubuntu version and then compile from git ? Does it matter which kernel I'm using, when using the latest progs from git ?
Q: Is it safe(r) to use the latest version in git ? A: The btrfs-progs master branch from Chris Mason is updated after manually selecting, integrating and testing the commits. So, Yes, for the master branch in this repository it is safe to use the latest version (the git HEAD). Q: So to change to the compiled progs, I would have to first uninstall the ubuntu version and then compile from git ? Does it matter which kernel I'm using, when using the latest progs from git ? A: Please read https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories . At least the build dependencies section is relevant. And Yes, I would uninstall the Ubuntu package first. If you "make install" the btrfs-progs after fetching them from git, they are copied to /usr/local/bin, which means that you need to have this directory in your path. About the kernel version. I expect that it would work with your 3.8 kernel. But generally speaking, for Btrfs you should at least use a kernel from the latest stable series. Refer to https://wiki.ubuntu.com/Kernel/MainlineBuilds?action=show&redirect=KernelTeam%2FMainlineBuilds which explains the details for Ubuntu.
Ok, I now have btrfs-progs installed from btrfs receive is working fine. backing up is so much faster now !! thanks !