I have two hard disks on two machines, connected remotely. I would like to start using the promising btrfs send/receive feature to speed up the incremental backup I take over the net, instead of rsync.

On the backup side I already have a backup copy of almost all the data (about 1TB). I did a lot of search, but every article I found starts sending all the data to the new location to bootstrap the incremental backup scheme. 1TB is a lot of data to transmit on the internet and btrfs send/receive can't resume if something goes wrong, as far as I understood. I could store the huge stream in a file and send it with rsync, but what if I don't have a spare 1TB to store the temporary stream file (on each side...)?

Now the question is: can you someway reuse already existing data on the backup side to start using the send/receive feature of btrfs OR a first send of ALL the data must be executed in any case?


From the btrfs send manpage:

You must not specify clone sources unless you guarantee that these snapshots are exactly in the same state on both sides—both for the sender and the receiver.

Here "exactly" is stronger than just the same files, "exactly" applies to the snapshot as defined from btrfs' point of view of metadata, checksum, layout and any data sent by btrfs send.

While it can be annoying for the first time setup, that's what allows the btrfs send/btrfs receive combo to work so well, because it can just send only the changes to the snapshot as stored by btrfs. You're essentially serializing the parts of your filesystem (not just of your files) that changed and sending them over to the other side.

  • Thank you for your clarification. I already understood that "exact state" is a much stronger condition than "same files". I wondered if there could be a workaround to avoid the full initial copy. I must conclude there is not. – lgaudino Mar 9 at 15:13
  • This has one big consequence: you must always keep at least one common snapshot between original location and backup. When you lose the last common snapshot you must restart with a full copy. I will keep this in mind with my backup policies. – lgaudino Mar 9 at 15:20

Your Answer

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

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