Rsync Backup Server

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 08:23, 15 September 2009 (edit)
Cozzer06 (Talk | contribs)
('''Introduction and Overview''')
← Previous diff
Revision as of 08:24, 15 September 2009 (edit) (undo)
Cozzer06 (Talk | contribs)
(Headline text)
Next diff →
Line 1: Line 1:
MUHAHAHAHAHAHAHAHA MUHAHAHAHAHAHAHAHA
-== Headline text ==+== NOOOBS==
 +MUHHAHAHA
== '''Requirements''' == == '''Requirements''' ==

Revision as of 08:24, 15 September 2009

MUHAHAHAHAHAHAHAHA

Contents

NOOOBS

MUHHAHAHA

Requirements

Good Howto on setting up a USB flash drive as the main /jffs/ [1]

Install Rsync on DD-Wrt

Make sure optware is setup right and that you have ushare available to you

/opt/bin/ipkg-opt update
/opt/bin/ipkg-opt list | grep rsync

returns: rsync - 3.0.4-2 - fast remote file copy program (like rcp)

/opt/bin/ipkg-opt install rsync

Basic Rsync Server Configuration

Create a path on your mass storage usb drive. You need to have it setup on a drive with lots of storage since it will be backing up your PC.

example: /mnt/drive1/rsync/pc1


vi /opt/etc/rsyncd.conf 

I am not sure if this is the most secure uid & gid but using uid = nobody & gid = nogroup gives me group errors. This works just fine

uid = root
gid = root
use chroot = yes
max connections = 5
syslog facility = local3
pid file = /var/run/rsyncd.pid
secrets file = /opt/etc/rsyncd.secrets

[pc1]
        path = /path/to/mass/storage/rsync/pc1
        comment = PC1 Rsync
        read only = no
        auth users = user1
 [pc2]
        path = /path/to/mass/storage/rsync/pc2
        comment = PC2 Rsync
        read only = no
        auth users = user2


Add as many rsync profiles as you need, just make sure you make a separate user for each one in the next step.


Set your share username & password

vi /opt/etc/rsyncd.secrets

Add a line for each user

user1:mypassword1
user2:mypassword2

Enable Rsync daemon

vi opt/etc/default/rsync

Change RSYNC_ENABLE=false to RSYNC_ENABLE=true


Start Rsync Daemon

/opt/etc/init.d/S57rsyncd start

Check to see if its running

ps | grep rsync

Should return

30081 root      1456 S    /opt/bin/rsync --daemon


Client Configuration - Windows

I found DeltaCopy to be pretty quick and painless as far as windows clients goes. Download DeltaCopy

Setup is pretty easy. Create a new profile and set the following.

Profile Name: whatever you want Server IP: 192.168.1.1 or whatever your ddwrt router ip address is Virtual Directory Name: pc1 or whatever you called your profile in rsync.conf " [pc1]"

Test Connection & Add Profile

Click on the profile name and click on the Authentication Tab

enter your username & password you entered in the /opt/etc/rsyncd.secrets section

Client Configuration - OSX

The Mac makes it easy, as rsync comes with all recent versions of OS X. Just use rsync as you would on a Linux system. For example, to back up the home directory for a user named John, to the profile defined as 'pc1':

rsync -az /Users/john user1@192.168.1.1:pc1

Client Configuration - Linux

sudo apt-get install rsync
rsync --verbose  --progress --stats --compress \
     --recursive --times --perms --links --delete --exclude "*~" \
     /your/dir/to/backup/* user1@192.168.1.1:pc1

you can set up a simple cron nightly to do this

Questions / Comments

email undertoe at chemlab dot com