Rethink Backup via btrfs-sync!?


i tinkered with the recent Nextcloudpi image for a while now and came to the conclusion that the btrfs-backup strategy is not sufficiently usable, yet the cheap snapshots are very tempting.

To elaborate:

I set up a working “nc-snapshot-auto + nc-snapshot-sync” and everything worked fine for a while, so far - good job!
Unfortunately the connection to the backup server is a little wobbly… a couple of days ago the synchronization of a bigger blob of data failed due to a sudden disconnection. During my investigation i found the following:


  • A single disconnect breaks the automated synchronization
    • The following run(s) aborts upon encountering the unfinished snapshot
      • btrfs receive does not seem to be resumeable


  • manually delete conflicting snapshot(s) on the server and restart synchronization (or wait for cron to do the job)

Suggested fix:

  • Automatically delete conflicting snapshot(s)
    • Which would be a rather bad fix for poorly connected servers, for others it is necessary
  • Abandon send/receive and instead use rsync --inplace + remotely invoking the snapshot mechanism for created snapshots

Best regards


That’s a good point , thanks. There is rsync support as well, but it is no match for the BTRFS snapshot capabilities IMO.

That sounds relatively easy to improve, it would be great
if you could paste this in the btrfs-sync github tracker.

Thanks for the feedback

I would suggest you use btrbk instead. It is actively maintained and handles failures well. It can also send over ssh or even send to compressed files stored on wherever you want.
#btrbk on irc freenode

1 Like

fixed, a failed transfer will be cleaned so the next attempt will work

@anon9582441 my humble script also can send over ssh and use compression :wink: