2

I like rsync. I can see what files will be deleted first. But what happens if during the backup, a sector of the source disk fails? Files could be deleted from the destination that should not be. However, if I check the log file for all deletion files first, then use the log file as instructions to rsync, then a source disk failure during backup should result in a lower probability of data loss.

I've read the man page and have to conclude that the answer is no. If not rsync, then what?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Brad Porter
  • 449
  • 4
  • 6

1 Answers1

0

You can mitigate source disk failure risk using

 --delete-after          receiver deletes after transfer, not during

That will not delete files if a IO error is produced during copy.

But for ensuring integrity of your backup, I think the right way is using:

 --only-write-batch=FILE like --write-batch but w/o updating destination

That will write diffs into a file. Once batch is created, you move it to destination machine, and apply diffs with:

 --read-batch=FILE       read a batched update from FILE
Raul Andres
  • 3,766
  • 15
  • 24