Mirror DNS-323 Drives via Rsync

The DNS-323 is an incredibly affordable and customizable NAS which I’ve thrown into my mixed LAN consisting of OSX, Linux, and Windows boxes. In my particular set up, I have two 2 TB Western Digital EARS Caviar Green drives. Instead of configuring them in RAID-1 mode, for the added stability, I’ve decided to use them as individual drives with an RSync cron job copying the contents of one drive to the other at 4 AM each day.

Here’s the command I use to run Rsync.

/mnt/HD_a2/ffp/bin/rsync -rpv --size-only --delete --exclude=.DS_Store --exclude='Temporary Items' --exclude='Network Trash Folder' /mnt/HD_a2/NAS/ /mnt/HD_b2/

Several things to note:

  • Files in the destination partition which do not exist in the source partition are automatically deleted.
  • Modified files are only written from the source to destination if the size has changed.
  • Rsync recurses into directories.

Remember that RAID-1 configurations are NOT the same as backups. Why? If you delete data on one partition, depending on your configuration, it will automatically get deleted on the other. Eh, semantics if you ask me. In my network, the DNS-323 serves as a NAS and as a backup. 🙂

Also, to get Rsync set up on your DNS-323, spend some time following the walkthroughs at the DNS-323 Wiki.

On another note, because my NAS is used in an environment with different operating systems, I occasionally run the following command to clear out resource forks (file names preceded by “._” courtesy of OSX).

find . -name "._*" -exec rm '{}' ; -print
Previous article
Next article

Related Articles

2 COMMENTS

  1. This is exactly what I’m looking to do. It looks like you’ve had this configuration going for a few months now. How has it worked out?

    Would I be correct in understanding that the only drive you work with directly is the source partition (Volume_1) ?

    I currently have a 1TB Hitachi and am looking to get a pair of the 2TB WD’s or maybe the Seagate 2tb Barracuda’s.

    How have the WDs done for you?

    • Its been working great, Joe! You’re absolutely right about working directly with Volume_1. This is where you’ll manipulate your data (add/remove files, rename directories, etc.) Based on when you run the cronjob, all your modifications will automatically be reflected on Volume_2 the next morning. 🙂 Just keep in mind that the initial mirroring of your data could take a very long time depending on how much data you’re working with.

      The 2TB WD Caviar Greens have been working out great for me! I’ve never had a problem with WD in general, although I’ve heard great things about Seagate’s products. You’re rolling the dice with any platter drive though. 😉

      I’ve only had to manually restart the NAS once or twice since writing this post when the volumes would not show up on my LAN, but the overall configuration has otherwise been very stable (and very economical in terms of energy consumption and hardware cost), so I’m happy. 🙂

      Thanks for the inquiry!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Try EchoTools - my free, iOS ultrasonography reference application!

Latest Articles