javascript:void(0) Save Template

Friday, October 3, 2008

Data Replication Technique for Windows XP/Vista Home Users

Most people have home network with multiple computers connect via routers/switches. They edit a file,let's say their resumes, on different computers from time to time. It is hard to keep the track of each version because each version are branches from the original version. You can use data replication technique to resolve this versioning chaos. All your working files can be setup to sync so you don't need to handle the version problem issue anymore. The tool that does the trick is robocopy.

Robocopy is an utility in Microsoft Windows Server 2003 Resource Kit Tool. It is widely used by system administrators to perform updates across hosts running Microsoft Windows. It is standard equipped in Windows Vista, but not all XP computers has it. This kit can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en.

Prior to performing the copy using the robocopy tool, credentials need to be established between the two computers. The NT command "net use" is used to initiate communication between the computers. You need to use Command Prompt to do this. The command used is the following:

C:\> net use \\REMOTE_COMPUTER\TARGET /user:USER PASSWORD

REMOTE_COMPUTER is defined by the ADMIN_REMOTE_HOSTNAME property variable, and TARGET is defined by the ADMIN_REMOTE_ROBOCOPY_AUTH_TARGET property variable. USER and PASSWORD are obtained from the ADMIN_REMOTE_USER and ADMIN_REMOTE_PASSWORD property variables. So, you can set this up with a small batch script to run automatically daily, weekly or monthly.

When credentials are successfully established with net use, the robocopy tool can transfer files between machines.

Use robocopy tool with the following syntax:

C:\> robocopy \\REMOTE_COMPUTER\REMOTE_PATH LOCALPATH FILENAME

This command copies FILENAME from a remote source to local destination. Using a local source and remote destination is also acceptable. If FILENAME references a directory, add the options `/E /Z' to the robocopy command, allowing recursive subdirectory copy.