Results 1 to 7 of 7

Thread: Using rsync over a network

  1. #1
    Join Date
    Sep 2008
    Location
    Sheffield, UK
    Beans
    21
    Distro
    Ubuntu

    Using rsync over a network

    Hi,

    I'm using rsync to backup an XP pc to an ubuntu desktop. My problem is that cygwin rsync seems to cut out every 10-30 minutes. I'm not sure why, it says 'peer refused connection'. So maybe its my network being a bit of a fail.

    My question is: how do I set rsync, on the ubuntu box, to do a backup every hour, of the windows pc, unless there's already one running, and if the connection fails, just to wait until it comes back?

    I'm a newbie at this, so tell me what to type in steps would be very cool.

    Bless,
    Chris

  2. #2
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    8,798

    Re: Using rsync over a network

    Howdy,

    Try using the bw parameter of rsync to throttle things a bit, then it should keep going.

  3. #3
    Join Date
    Apr 2008
    Location
    Columbia, SC
    Beans
    282

    Re: Using rsync over a network

    1. definitely sounds like your network is failing hard. are you using wireless? if so... try not using wireless.

    2. try not using cygwin and rsync... there's a prepackaging of rsync server for windows that usually works a little better. Google cwrsyncserver. Find, install, configure.

    3. simple shell script... name it "rsyncbackupscript.sh", for reasons that should be readily apparent:

    Code:
    #!/bin/sh
    [ $(ps waux | grep rsyncbackupscript | grep -v grep | wc -l) -eq 0 ] && /usr/bin/rsync -har --delete your.xp.machines.ip::rsyncshare /path/to/your/backup/folder/
    Now make it executable:

    Code:
    you@box:~$ sudo chmod 755 /home/you/rsyncbackupscript.sh
    Now add a crontab to run it every hour, using sudo crontab -e (to put it in root's crontab... you can leave off the sudo, if you'd rather have the process run as you). NOTE: if you don't like vi, you might want to do EDITOR=/usr/bin/nano and export EDITOR before you try doing the crontab -e!

    Code:
    # m h  dom mon dow   command
      0 * * * * * /home/you/rsyncbackupscript.sh
    That oughta do it.

  4. #4
    Join Date
    Sep 2008
    Location
    Sheffield, UK
    Beans
    21
    Distro
    Ubuntu

    Re: Using rsync over a network

    I need to get an extra box for my router. only got one ethernet port at the moment. Then I can ditch the wifi.

    the shell script is to go on the ubuntu machine yeh? The cwrsyncserver can just work as a client despite the name?

    Will attempt this tonight, after i've bought a ethernet box

  5. #5
    Join Date
    Sep 2008
    Location
    Sheffield, UK
    Beans
    21
    Distro
    Ubuntu

    Re: Using rsync over a network

    wow, installed cwrsyncserver. its tiny!

    Chris

  6. #6
    Join Date
    Sep 2008
    Location
    Sheffield, UK
    Beans
    21
    Distro
    Ubuntu

    Re: Using rsync over a network

    Should /path/to/your/backup/folder/ be the path on my pc i want backed up: Ie E drive, or the place I want files saved to on the linux machine.

    If the later, where do I say where I want files actually saved?

    Chris

  7. #7
    Join Date
    Sep 2008
    Location
    Sheffield, UK
    Beans
    21
    Distro
    Ubuntu

    Re: Using rsync over a network

    Ok, so i am still with cygwin, having had not much help in moving away from it.

    My current code to run rsync reads
    C:\cygwin\bin\rsync.exe -qrtz --password-file=/secret > --delete "/cygdrive/e" boss@192.168.1.10::bossbackup

    I am getting told that permission is being denied to E:/System Volume Information/

    However, even with --exclude "/cygdrive/e/System Volume Information" I am still getting the same issues.

    Any ideas?
    Chris

Tags for this Thread

Bookmarks

Posting Permissions

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