Automating backup to second unRaid server


Recommended Posts

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?

 

 

 

Link to comment
  • 9 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.