2

I have an odd issue with rsync running version 3.0.9 I have not done anything fancy, like setting exclusions, etc. All I want it to do is make sure that it keeps me a backup directory in sync with the source just in case my drive goes boom!

The command I'm running is

rsync --archive --delete --verbose /sourcedir/ /destdir/

I added the --verbose to see what was happening as not all the files were being copied across.

What I see is it running down a list of directories, it gets to one directory and just stops. There is no error reported, it just returns to the prompt.

I've tried it without the --verbose and --delete options and even deleting the directory in case there is a suspect file in there - at which point it simply stops at the next directory. It is always at the 33rd directory being copied/checked.

I even tried it with --dry-run and it still stops.

I've also tried clearing out the destination directory and starting from scratch, and when I do this is goes through and copies everything. however the next time rsync is run, it halts again.

As a last resort, I even formatted both source and destination drives from scratch and recreated the source directory from a previous backup taken elsewhere. I even tried two completely different physical hard drives in case there was hidden corruption on the platters.

Both drives are connected physically to the same machine, so it isn't network packets dropping, and I've even changed SATA ports, SATA cables, and even two USB drives.

My last test was to delete the entire directory from the source, and also the directory that it copied before this, and the one it would have copied next. Again it just failed later, again on the 33rd directory - a completely different one than before.

I'm at my wits end, especially as rsync is working perfectly with other directories, some much smaller with less files, some much larger with files in tens of gigabytes in size.

I've searched the web and cannot find anyone else who has this problem.

I'm aware there is a later version of rsync, but I'm not too clear on how to update it. For information, the version of Linux I have is

Linux version 3.2.26 (root@steveh-ubuntu) (gcc version 4.7.3 20130102 (prerelease) (crosstool-NG linaro-1.13.1+bzr - Linaro GCC 2013.01) ) #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel

closed as off-topic by Jeff Schaller, Kusalananda, slm Nov 12 '17 at 15:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Kusalananda, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

  • You say it stops and comes back to the prompt, ok, what is its return code ? Do echo $? directly after rsync has finished – thecarpy Nov 9 '17 at 13:31
  • you could try running it prefixed with strace -f -o sometmpfile and then check the last few lines of that file to see what system calls were being done when it died (add result to your post). – meuh Nov 9 '17 at 20:32
0

I tested all the solutions mentioned above; temp directory was nowhere near capacity; and over 2TB remaining on the hard drive as well, so disk space wasn't an issue.

What I eventually did was to use cp to copy the files from source to destination. After that, I deleted the source and used rsync to reverse the copy from the backup to the main drive. This went without a hitch.

Tried the rsync command again to test that it will backup the directory, and it ran without a problem.

Not the answer you're looking for? Browse other questions tagged or ask your own question.