Rsync on a Linksys NAS200 NAS - Howto

After some demands regarding the rsync on NAS200 post, here is a quick howto on how to (huhu) create an rsync server with a Linksys NAS200…feel free to comment this post if something isn’t clear enough. I assume that you know how to compile things under Linux and have all the necessary tools installed.

So…first of all, grab the GPL firmware source code from Linksys here. It’s version V34R62 at the time of this post. Then grab a stable rsync source code (version 2.6.9) here. You are now ready to begin the configuration and compilation to obtain a brand new rsync-enabled NAS200!

  1. Uncompress the firmware source code somewhere.
  2. Uncompress the rsync source code to the NAS200_V34R62_GPL/source directory.
  3. Modify the Makefile in the NAS200_V34R62_GPL/source/rsync-2.6.9 directory. You need to make an “include” at the top of the document and modify the TARGET elements. For your convenience, you can grab my already modified Makefile here.
  4. Modify the firmware startup script to launch rsync as a daemon. Edit NAS200_V34R62_GPL/source/mipsel/target/etc.default/rc.d/rc.local and add /usr/sbin/rsync –daemon at the end of it.
  5. Configure the rsync daemon, to do this you have to create 2 files in the NAS200_V34R62_GPL/source/mipsel/target/etc.default/ directory:
  • rsyncd.conf which contains the “rsync shares”. The content of this file looks like this:
log file = /harddisk/volume_1/data/rsyncd.log
pid file = /harddisk/volume_1/data/rsyncd.pid
lock file = /harddisk/volume_1/data/rsync.lock
[backup_disk1]
path = /harddisk/volume_1/data/
uid = root
gid = root
read only = no
list = yes
auth users = backupuser
secrets file = /etc/rsyncd.secrets
  • rsyncd.secrets which contains the user and password to access the share. You also need to chmod 400 this file, otherwise it won’t work. The content of this file looks like this: backupuser:password

Note that the /harddisk/volume_X/data path depends on your disk configuration. If your disks are stand alone, the X is 1 or 2, if you have a RAID1 array, the X is 3, for the USB ports, the X is 5 or 6. You should set this directory to a path that you can access with samba for instance, so you can edit/create the files if needed…Obviously, your disks need to be formatted via the web interface at this point.

You are now ready to compile your firmware! Go to the NAS200_V34R62_GPL directory, run configure and make…wait 15 minutes and you’re done! If there are no errors, you can get the new firmware in the NAS200_V34R62_GPL/images directory, it’s the 8MB file. Flash your NAS200 with it, reboot the NAS and you can now access your brand new el-cheapo rsync server.

Remember that the hardware is really weak, so don’t try to do real-time compression during the transfers.

3 Responses to “Rsync on a Linksys NAS200 NAS - Howto”

  1. Alphatek - Steven’s Tech Blog » Blog Archive » rsync on a Linksys NAS200 NAS Says:

    [...] Edit: I wrote a howto about it here. [...]

  2. zen Says:

    Hi,
    Great howto. Did you just upload the new file through web interface?

  3. Steven Says:

    Yes, you “upgrade” it like a normal firmware.

Leave a Reply