Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to backup a btrfs partition verbatim (including all the shared structures which save space by marking snapshot trees as COW) to another one? For instance, I'd like to backup my root partition which has couple of btrfs subvolumes (snapshots of the / itself).

The only way I can think is to use a block copying tool like dd but that is inefficient as my partition is only 20% full and I intend to back it up regularly. I already backup everything incrementally using rsync, so this is not a workaround for another problem. I simply need a bit for bit clone of my btrfs partition without having to use a tool such as dd.

I know ext3, for instance, provides a dump and restore utility. That is the kind of thing I'm looking for.


Here is a update to clarify the fact that I want to be able to access the files on the backup storage the same way I can on the live disk (ie I do not want to store dump files on the backup storage).

share|improve this question

Pipe the output of dd through something like bzip2 or your other favourite compression program that'll read from standard input. I've done this on a 500 GB disk that had a relatively small install and ended up with an 8 GB file.

share|improve this answer
You would have to fill up the free space with zeroes first (e.g. cat /dev/zero > zeroes) to get rid of the unlinked data which is still on the disk. But that might not work anymore when BTRFS gets block-level data deduplication in the future. – Wim Coenen Oct 11 '10 at 10:25
Please see the update to my question. – Mansour Oct 11 '10 at 11:50

I think apparently there isn't such a tool (yet, ATM).

share|improve this answer

just fyi ext2/3/4 dump doesen't do what you want to do ... only fs capable of doing this i am aware of are ntfs (using ntfs-3g) and zfs

though you could pull this off using lvm and and experimental thin provisioning ...

Edit: got back to this few years later realizing, you can do this with any filesystem using squashfs ...

share|improve this answer

Not tried yet, but btrfs-image seems to solve this problem:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.