Rethink Backup via btrfs-sync!?

ncp
backup
#1

Hello,

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:

Problems:

  • 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

Workaround:

  • 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

0 Likes

#2

Hi

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

0 Likes

#3
0 Likes

#4

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

0 Likes