David e-mailed my dad (I’m just Tim) with a question about using RSYNC in Windows to backup to FreeNAS when the data is in two different locations. Since my dad doesn’t know anything about FreeNAS, I figured I’d answer:

Dear Mr. Fehlman,

Congratulations on your excellent series of articles on FreeNAS. I have got a Dell PIII with 640MB RAM and a single 30GB disc up and running with FreeNAS; the disc has two partitions one for FreeNAS and the second for data. Ultimately, what I would really like to aim for is a RAID FreeNAS to backup family photos, and MYOB business data….and here lies a problem.

It would appear that in FreeNAS each partition represents a single share point. With RSYNC, we need a matching share on the Windows box, and this Windows share (represented by a virtual directory in DeltaCopy) can only point to a single folder. Am I correct in stating that if I wanted to backup two different folders on the Windows box (say, MYPHOTOS and MYOBDATA), I would need two virtual directories in DeltaCopy, and thus would need two matching data partitions on the FreeNAS box? I note your link to “How to partition hard-drives for FreeNAS“, but I’m starting to get out of my depth by this stage (I consider myself a newbie luddite).

Many thanks for your comments,

David

Well, David, you are correct. There needs to be a 1:1 ratio between folder and backup on the FreeNAS using RSYNC. So, how do you go about backing up several different folders that are all over your hard drive? There are three different ways that this can be accomplished.

1. Move All Data One Folder

The first thing that comes to mind is that you can store all of your data in subfolders under one folder (e.g. My Data). Then, all you would have to do is set up one partition on the FreeNAS box and RSYNC the one folder to the FreeNAS partition.

2. Create an Intermediate Backup Folder

“But, what if you can’t move the data?”, you ask, “There are a lot of programs out there that do not let you specify where the data can be stored. How would you back up something like that?”

You could create an intermediate folder where you use a program such as Cobian Backup to copy all of the files to one folder and then RSYNC that folder to the FreeNAS box. Unfortunately, you now have two copies of your data residing on your hard drive which has a tendency to get pretty huge after a period of time.

There is also the issue of the initial file backup still running when RSYNC fires up. This means that you will be copying your data to the FreeNAS box prior to the backup completing. Definitely an issue.

3. Use NTFS Junction Points

The solution that I thing is the geekiest (thus, the coolest) is to use NTFS junction points. Essentially, you make the system think that an empty folder in a backup folder actually contains your data. Then, when RSYNC goes to copy the data, it will follow the junction points and backup everything you want.

Junction Link Magic
If you are new to NTFS junction points, this can be a bit of an odd concept to get used to. The way I wrap my head around it is to think of them like “stealth” shortcuts. Just like a shortcut on your desktop can point to a file or folder somewhere else on your hard drive, junction points point to other folders on your hard drive. The difference between shortcuts and junction points is that the file system sees shortcuts as files with an .LNK extension but it sees junction points as just another folder on your hard drive.

If you are interested in working with junction points, there are a lot of different programs out there that will allow you to create and delete them on your system. The one that I use the most is called Junction Link Magic and is available as freeware (of course). There are a lot of others out there but this is just the one that I am familiar with.

Junction Point Loop
Just a quick word of warning. You can really mess up your system if you go deleting junction points without understanding what they actually are doing. I suggest that you only create new junction points in folders that you have just created for the purpose of redirecting information. I also suggest that you do not delete any junction point that you dis not create. This is another great way to destroy your system. And finally, do not create a junction point that points to a folder higher up in the directory tree. This will create a junction point loop and if you are backing up this folder, you will never finish your backup.
Also be aware that you can only perform NTFS junction points on Windows 2000 and above. Your hard drive also needs to be formatted NTFS.

RSYNCed Data Unavailable

Data UnavailableNow, this brings up another problem. People are finding that they are not able to access their RSYNCed data. This is a know issue but there is a solution….which I will tell you about tomorrow!