srochford Posted March 14, 2011 Posted March 14, 2011 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)
keithu Posted March 14, 2011 Posted March 14, 2011 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.
srochford Posted March 14, 2011 Author Posted March 14, 2011 Thanks will try that (sounds very plausible; some of the files are >100Gb so there's no room for a temp copy!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now