*nix Thread, rsync - continue on error in Technical; I'm trying to sync the contents of 2 Linux servers using rsync. I've got a series of commands like this:
14th March 2011, 02:25 PM #1
rsync - continue on error
I'm trying to sync the contents of 2 Linux servers using rsync. I've got a series of commands like this:
rsync -av --progress --delete server.ic.ac.uk:/datadump2 /datadump2
which work until you run out of space on the server I'm copying to.
I'm pretty sure there's enough space - it's just in the wrong place (ie total used on the server I'm copying from is just less than 2Tb and I'm copying to a 2Tb volume. du tells me that the total used should fit but I'm guessing that it's trying to copy new files from the source before it deletes files on the destination which have now been deleted from the source)
I'm used to using robocopy in Windows - I'd do something like
robocopy /mir /w:1 /r:1 \\server1\datadump2 \datadump2
and this would just try and copy files; it might run out of space on the first pass but would just skip (wait one second; retry once are the switches) and then delete files. The next pass would copy files missed the first time.
How can I make rsync carry on if it's out of space? I know there's a "--ignore-errors" switch but as I understand it that let's it carry on if for some reason it loses touch with the source server but this can end up with you deleting everything from the backup server so it's not what I want!
(edit: just read the man page a bit more carefully and I wonder if something else is going on; it says that --delete is supposed to do the deletes before it tries to copy)
14th March 2011, 04:01 PM #2
You could try adding the --inplace option.
By default rsync updates files by building a temporary copy then moving the copy in place of the original. '--inplace' tells it to immediately overwrite the original.
14th March 2011, 04:08 PM #3
Thanks will try that (sounds very plausible; some of the files are >100Gb so there's no room for a temp copy!)
By CyberNerd in forum *nix
Last Post: 2nd February 2011, 03:00 PM
Last Post: 17th June 2010, 11:57 PM
Last Post: 16th March 2010, 11:23 AM
Last Post: 5th May 2009, 08:33 PM
Last Post: 11th July 2007, 02:34 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)