Resumable transfer for btrfs send

As I understand it, your remote storage is exposed as a filesystem. I don't use btrfs myself but I assume the snapshots are equivalent to one large "full backup" file followed by a number of smaller "incremental" files.

On that basis I'd still go with rsync because it's restartable. You can't use its snazzy delta differences algorithm unless there's an rsync server available on the remote host, but you can tell rsync to assume the source file hasn't changed and to continue after a break from the byte offset it had reached:

test -t 2 && progress=--progress
rsync -av $progress --partial --append --sparse /path/to/source.img /path/to/remote/storage/

If you can usefully gzip your source file before transferring it, do so. (Neither --rsyncable nor rsync -z is relevant for what rsync sees as a local to local file transfer.)


btrbk supports:

Resume of backups (if backup target was not reachable for a while)

buttersink supports:

local btrfs file systems, remote btrfs file systems over SSH, or S3 buckets.

Or you can do it manually:

  1. Instead of writing to a shell pipe via stdout, use the -f option to write send's data to a file:
    btrfs send -f outfile
  2. Use your favourite resumable tranfer method (eg rsync) to transfer the file
  3. Use btrfs receive -f outfile to read the data from outfile instead of from stdin