How to: turn a DLink DNS-323 into a Rsync backup locationon May 20, 2013 at 00:36
After purchasing a Synology DS-413J to replace my DNS-323 device, I wanted to repurpose the old NAS into a backup server. In my mind, I pictured using a Richcopy or Robocopy scheduled task from a Windows machine to talk to the 2 devices. As it turns out, both the NAS’s can speak the same language (linux) and there’s a handy little tool that takes a couple steps to do, but is well worth the effort if you want re-purpose a DNS-323.
DNS-323 instructions: You need Funplug!
1. Funplug instructions have been around for a while, NAS-TWEAKS has an excellent blog style article you can follow. Here’s the cole’s notes version:
rsync -av inreto.de::dns323/fun-plug/0.5/packages . funpkg -i *.tgz
pwconv passwd login store-passwd.sh
cd/mnt/HD_a2/ffp/start sh sshd.sh start chmod a+x sshd.sh
That’s the most condensed version of Funplug I can give you guys, there’s lots of more minute details, but for now that will do to get what’s necessary: RSYNC and SSH services on the DNS-323.
2. Configuration of RSYNC requires some small knowledge of text editor vim or ‘vi’ as the busy box package has. First, SSH in with the root account, and create a new file named rsyncd.conf in the /mnt/HD_a2/ffp/etc directory:
login as: root root@DNS323's password: root@DNS323:/mnt/HD_a2# cd/ffp/start root@DNS323:/mnt/HD_a2/ffp/start# sh rsyncd.sh status rsync not running root@DNS323:/mnt/HD_a2/ffp/start# cd .. root@DNS323:/mnt/HD_a2/ffp# cd etc root@DNS323:/mnt/HD_a2/ffp/etc# vi rsyncd.conf
The contents of rsyncd.conf should look like the below:
# /ffp/etc/rsyncd.conf configuration file max connections = 2 secrets file = /ffp/etc/rsyncd.secrets use chroot = false read only = no list = false strict modes = false hosts deny = * timeout = 600 dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz *.mkv *.avi *.mpg *.jpg *.rar pid file = /var/run/rsyncd.pid [File Backups] hosts allow = 192.168.0.1/24 #your local network IP range read only = false gid = backup uid = backup auth users = backup_user path = /mnt/HD_a2/Backup_directory #Path of Backup on DNS unit
I’ve highlighted the lines you’ll need to change:
= This is the IP Address range of your local network, the above example is for a standard Class C network, make the appropriate changes to yours. The /24 denotes the type of subnet mask you’re using. /24 pertains to a standard 255.255.255.0, this typically will fit your home network. Otherwise, here’s a cheat sheet on subnets.
= This user has to be created through the DNS-323 web server. You can stick with the standard ‘Admin’ account if you want, but for security purposes it’s a good idea to have a separate one for backup jobs.
= is the path on your DNS-323 of where you’re going to backup your data.
3. After saving rsyncd.conf, you’ll have to create a new file, rsyncd.secret:
root@DNS323:/mnt/HD_a2/ffp/etc# vi rsyncd.secret
Contents of rsyncd.secrets is very short as it contains the username and password of your backup user authenticated from rsynd.conf:
#One line per user; a User ID:(colon)then password backup_user:password
The command is just one line, username:password. This is where you fill in the username and password created in the web interfaced of your DNS-323, and specified rsyncd.conf.
root@DNS323:/mnt/HD_a2/ffp/etc# sh /mnt/HD_a2/ffp/start/ rsyncd.sh status rsync not running root@DNS323:/mnt/HD_a2/ffp/etc# sh /mnt/HD_a2/ffp/start/ rsyncd.sh start Starting /ffp/bin/rsync --daemon --config=/ffp/etc/ rsyncd.conf
you can also run
sh rsyncd.sh status
To see if the Rsync service has been started properly.
Now we configure the Synology to backup to RSYNC services on the DNS323
4. After logging into DSM, goto Backup and Restore, open the backup wizard to open a new job. For the destination type, choose an RSYNC-compatible server.
5. Punch in the data for your DNS-323, it should similar to the screencap below
After you hit, next DSM will test the connection for you. As long as you’ve configured the RSYNC on the DNS-323 and started the service, DSM should pick it up. After you choose your backup selections, make a schedule; set it and forget it.
Items to keep in mind
*Rsync is not hailed for speed, but reliability. My suggestion is to copy contents to the destination DNS-323 and then configure RSYNC to get changes. On average RSYNC only travels at around 2-4MBps.