I am using the below command to run regular network backups to a server:
btrfs send -f targetfile.txt /mnt/snapshots/@home_2018-10-30
Each backup is roughly 120GB in size.
My challenge is that every now and then the network disappears during the backup which leads to btrfs send getting stuck and the OS to be in a somewhat unstable shape. I can restart the network stack and btrfs send seems to recover but transfer rates are unbearably slow after the restart.
While It's easy to fix the OS with a reboot, the backup is unusable because btrfs send can't resume from where things went wrong.
As I was thinking about ways to address this I stared to wonder if using rsync wouldn't be a better approach anyway? Btrfs send -f creates one large file which makes it impossible to quickly get to individual files without running a time consuming btrfs receive first.
Whereas rsync will copy files and folders, similar to btrfs send | btrfs receive.
And, if the network goes down I can easily recover by running the same command again.
Any downsides you can think of by replacing btrfs send -f with rsync?
Before:
btrfs send -v -f /media/clientbackup/@home_2018-10-30 /mnt/snapshots/@home_2018-10-30
After:
rsync -avP --delete /mnt/snapshots/@home_2018-10-30 /media/clientbackup/
Edit:Well, after a nights sleep, here's what I came up with myself:
Won
- Ability to restore individual filesystem
- Ability to resume a backup
Lost
- Ability to do a btrfs restore.
btrfs send -f targetfile.txt /mnt/snapshots/@home_2018-10-30
Each backup is roughly 120GB in size.
My challenge is that every now and then the network disappears during the backup which leads to btrfs send getting stuck and the OS to be in a somewhat unstable shape. I can restart the network stack and btrfs send seems to recover but transfer rates are unbearably slow after the restart.
While It's easy to fix the OS with a reboot, the backup is unusable because btrfs send can't resume from where things went wrong.
As I was thinking about ways to address this I stared to wonder if using rsync wouldn't be a better approach anyway? Btrfs send -f creates one large file which makes it impossible to quickly get to individual files without running a time consuming btrfs receive first.
Whereas rsync will copy files and folders, similar to btrfs send | btrfs receive.
And, if the network goes down I can easily recover by running the same command again.
Any downsides you can think of by replacing btrfs send -f with rsync?
Before:
btrfs send -v -f /media/clientbackup/@home_2018-10-30 /mnt/snapshots/@home_2018-10-30
After:
rsync -avP --delete /mnt/snapshots/@home_2018-10-30 /media/clientbackup/
Edit:Well, after a nights sleep, here's what I came up with myself:
Won
- Ability to restore individual filesystem
- Ability to resume a backup
Lost
- Ability to do a btrfs restore.
Comment