rsyncbtrfs icon indicating copy to clipboard operation
rsyncbtrfs copied to clipboard

Handling rsync 'non critical' errors

Open nikmartin opened this issue 9 years ago • 2 comments

So I have yet to get rsyncbtrfs to make a backup that doesn't fail. Usually, It appears that temp/cache files that change on disk or disappear before rsync finishes is the culprit. I've tried 4 backup now and each time it fails with something like:

nmartin@deb:~/Downloads$ rsyncbtrfs backup /home/nmartin /media/backup3tb/nmartin
Create subvolume '/media/backup3tb/nmartin/.inprog-PmnUqyW/vol'
file has vanished: "/home/nmartin/.local/share/gvfs-metadata/label-ARCH_201504-291a92f3.log"
rsync warning: some files vanished before they could be transferred (code 24) at main.c(1070) [sender=3.0.9]
rmdir: failed to remove `/media/backup3tb/nmartin/.inprog-PmnUqyW': Directory not empty

this specific failure was due to a usb pen drive being unplugged during the backup. I guess I could build an excludes file to pass to the backup script, but is there a better method to detect 'OK' errors from rsync vs critical errors?

nikmartin avatar Apr 27 '15 15:04 nikmartin

Few points:

  • You can use the bind mount option to avoid copying temp files.

  • I'm certain rsync returns a different exit code based on the type of the error so it should be possible to only fail on critical cases (maybe enabled by a command line argument).

  • There seems to be a bug because as the last rmdir failed.

    I'll look into these soon.

oxplot avatar Apr 27 '15 18:04 oxplot

Hi

This problem is hunting me too. Were you able to look into it?

Cheers

dns2utf8 avatar Mar 11 '18 23:03 dns2utf8