spasszeit Posted August 28, 2010 Share Posted August 28, 2010 Now that I got my second server up and running, I would like to set up a scheduled back up of certain shares on Tower1 to Tower2. I think i got down the basics of the syntax for the rsyncd.conf file, and am able to sync Photos share (for now) manually but when it comes to automating all this I am in quite over my head, so I'd really appreciate some guidance on this. Here is what I am doing and questions I have: 1. Following JoeL's examples, I set up rsyncd.conf file on Tower2: uid = root gid = root use chroot = no max connections = 4 pid file = /var/run/rsyncd.pid timeout = 600 log file = /var/log/rsyncd.log [Photos] path = /mnt/user/media/Backups/Photos comment = /mnt files read only = FALSE 2. Automatically invoke rsync daemon process on Tower2 every time the server is rebooted. So, manually the daemon is invoked with this command: rsync --daemon --config=/boot/config/rsyncd.conf Should it be added to the go script? It would make sense, but I am curious why I don't see this command in the 'go' script in the example from this thread - http://lime-technology.com/forum/index.php?topic=3417.0 3. To start the rsync process based on some schedule, I understand I need to add something similar to this cron job to 'go' script on Tower1: #set up rsync between the two servers every other day at 3 am - will be commented out for Server2 go script echo "0 3 2-6,8-13,15-20,21-31 * * /usr/bin/rsync rsync://Server2/disk1/*" >>/tmp/crontab echo "0 3 2-6,8-13,15-20,21-31 * * /usr/bin/rsync rsync://Server2/disk2/*" >>/tmp/crontab echo "0 3 2-6,8-13,15-20,21-31 * * /usr/bin/rsync rsync://Server2/disk3/*" >>/tmp/crontab Say if in my case I want to build upon this manual command to do daily backups: cd /mnt rsync -avrH user/media/Photos tower2::Photos What should my entry be? I am trying to make sense of the example above but I am not sure I get all the syntax yet. Anything else I am missing? Quote Link to comment
heffneil Posted June 12, 2011 Share Posted June 12, 2011 I realize this post above is almost 1 year old but I would love to know how to get the cron job to work. I have a similar setup now and want to make sure I can get the cron job setup each time I reboot! Thanks, Neil Quote Link to comment
teamhood Posted June 12, 2011 Share Posted June 12, 2011 I third this one. I am nearing the steps of wanting to backup my unraid to an off-site unraid that I will be hosting at another location and I would like to setup an auto backup... ::starts some popcorn:: Quote Link to comment
dgaschk Posted June 12, 2011 Share Posted June 12, 2011 The crontab portion is not correct for a task on "every other day". It should look like this: "0 3 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 * * /usr/bin/rsync rsync://Server2/disk1/*" http://www.openjs.com/scripts/jslibrary/demos/crontab.php Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.