Tuesday, June 12, 2007

Sync Your Music and Photos The Easy Way

I've been looking for an easy, automated solution to synch my music and photo collections from one Windows PC to another. It needed to be something that would run every night and update the second PC with anything that had changed on the first PC without having to re-copy the entire thing each time. One solution for that was DeltaCopy - a Windows Rsynch wrapper that was highlighted by Lifehacker back in January. DeltaCopy seemed to work pretty well but was a little difficult to set up if you weren't familiar with setting up a server & client using Windows Services.
After much searching, I came across a solution that has been around for a long time, but has been used more by Windows Tech people then by your average PC user. The solution I chose was RoboCopy GUI. RoboCopy was released as a part of the Windows Resource Kit by Microsoft and was designed to copy and sync large groups of folders and files. It was also created with the ability to copy files to mapped drives across a network even if there was an interruption in service.
If you are a regular reader of this blog, you know I use a Home Theater PC (HTPC) to run all media in my house including television, movies, music, photos and more. I also have a second HTPC that runs as a client and streams much of that content from the server HTPC. What I wanted was to provide a backup of every file in my music and photo collection along with playlists, tags, itunes library etc. Here's how I did it.

Download Robocopy GUI from here DOWNLOAD ROBOCOPYGUI
Make Sure you have Microsoft .NET Framework version 2.0 installed

Install Robocopy GUI on the PC you will be Syncing

Run Robocopy GUI

On the Path tab, input the source path as whatever drive or folder on your network you want to copy or synch from. Then in the target path box, input the drive or folder you want to copy or sync to. I selected my music folder, my itunes settings folder and my photos folder.











Go to the Copy Options tab. Here you select any of the options for your copy or sync. There are a bunch of them so move your cursor over each box to see a description of what it does. For my purposes, I selected the following boxes:
/S - this copies all subdirectories
/Copyall - as it says, this copies everything files & all
/Purge - deletes destination files and directories that no longer exist in the source
/R 10 - ten retry attempts
/W 30 - time to wait between retries
/Mir should be selected if you want to mirror the entire directory tree.

You can also customize the sync via the filtors, logging and monitoring tab. There is a very extensive amount of custimization that can be done with robocopy. The gui version simply makes the cli version of the app more accessible to those not comforatable with cli.

Now go back to the path tab and check save script. The script will be saved in the folder you select so you can use this to run in Windows Scheduler.

Goto Start-Control Panel-Performance&Maintenance-Scheduled Tasks. In Scheduled Tasks, do add scheduled task and select "browse" and pick the cmd script you saved in the robocopy gui. Name it something like "music" and select how often you want it to synch or copy. Follow the remaining prompts in scheduled task wizard and you should be set.

Now when I make make a change to one of my playlists on the server PC, it mirrors that change on the second PC. If I update a tag (using Adobe Photoshop Elements) to one of my photos on the server PC, it is updated on the second PC. It's very useful and helps in the backup process as well. While I do still use Acronis TrueImage for a complete mirror image backup once every month or so, RoboCopy gives me an easy way to daily back up the files I don't want to lose.
Robocopy could also be used to mirror a complete drive to another computer in your network. It's a pretty powerful tool that I'm putting to use. A great way to sync or backup a large number of files automatically.

For more on Robocopy, try the wiki article or Microsoft TechNet

As always please feel free to ask any questions you have in the comments

To subscribe to this blog please CLICK SUBSCRIBE