+ Post New Thread
Results 1 to 3 of 3
*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: ...
  1. #1

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,156
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124

    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)

  2. #2

    Join Date
    Oct 2007
    Location
    Lincolnshire
    Posts
    133
    Thank Post
    0
    Thanked 22 Times in 22 Posts
    Rep Power
    17
    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.

  3. #3

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,156
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Thanks will try that (sounds very plausible; some of the files are >100Gb so there's no room for a temp copy!)

SHARE:
+ Post New Thread

Similar Threads

  1. SELinux rsync and apache
    By CyberNerd in forum *nix
    Replies: 1
    Last Post: 2nd February 2011, 02:00 PM
  2. Replies: 14
    Last Post: 17th June 2010, 10:57 PM
  3. Rsync problem in login/out scripts
    By dayzd in forum Mac
    Replies: 2
    Last Post: 16th March 2010, 10:23 AM
  4. Rsync X
    By ranj in forum Mac
    Replies: 2
    Last Post: 5th May 2009, 07:33 PM
  5. Rsync errors
    By edie209 in forum *nix
    Replies: 8
    Last Post: 11th July 2007, 01:34 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •