Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to maintain data in 2 shares synced

Posted on 2007-07-26
8
Medium Priority
?
236 Views
Last Modified: 2010-04-03
I have a buffalo terastation with 150GB of data on it.  I need to sync this data to a share on a Windows 2003 server.  What tool can I use to accomplish this?  The tool I select must be able to run as a service or script and must reliably sync the data day in day out without any interaction from me.  Thanks
0
Comment
Question by:menreeq
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 8

Accepted Solution

by:
thenone earned 800 total points
ID: 19577820
I would use Vice Versa cheap but effective

http://www.tgrmn.com/
0
 
LVL 25

Assisted Solution

by:Ron Malmstead
Ron Malmstead earned 600 total points
ID: 19578121
Use command line...with task scheduler...  Only one server should perform this task.
Simple two line batch file below.

xcopy "\\serverA\share\*.*" "\\ServerB\share\*.*" /D /E /C /I /H /O /Y >> c:\SyncLog.txt
xcopy "\\serverB\share\*.*" "\\ServerA\share\*.*" /D /E /C /I /H /O /Y >> c:\SyncLog.txt

This will syncronize files between two network directories...including all subfolders and files, by date modified, including hidden and system files, won't prompt to replace,....also it will continue copying even if one or more files couldn't be copied because they are in use.  The most recently modified file will replace the older on both servers.  If no files change the batch file will not copy anything and will terminate relatively quickly depending on your connection speed.  You will have a running logfile on C:\SyncLog.txt...if you don't need a log...just take it out.

If you want to make the copying more directory specific...you can edit this to dig into directories that change more often...

Example:
xcopy "\\serverA\share\work\users\*.*" "\\ServerB\share\work\users\*.*" /D /E /C /I /H /O /Y
xcopy "\\serverB\share\work\users\*.*" "\\ServerA\share\work\users\*.*" /D /E /C /I /H /O /Y
Get all of your most used directories synced first...then use the sync command on the root directory \\server\share  Otherwise it will start bottom level and work it's way up in alphabetical order for files and folders.

You can also use multiple batch files with task manager...just make sure one file isn't attempting to sync the same directory as another.  You can run several at a time...but i wouldn't do more than five.

0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 19578139
Forgot to mention..it also copy's ACL and Ownership info....if you don't want that...take out the  /O switch..    and use the /Z switch on the end...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:Zenith63
ID: 19578483
If a scheduled sync as xuserx2000 suits I would recommend using Robocopy istead of XCopy.  It is part of the Windows 2003 Resource Kit.  Using the /MIR switch it will also delete files from the desitination to keep the directories truly in sync.  XCopy won't delete at the destination, so over time if files are being deleted on the source the directories will not be in-sync)
0
 
LVL 11

Assisted Solution

by:Zenith63
Zenith63 earned 600 total points
ID: 19578504
Should have said, the command would be as follows -

robocopy Z:\ E:\ /MIR /COPYALL /R:0 /W:0

This will set Z: as the source and E: as the destination.  It will mirror the directories, eg. if a file is deleted on Z: Robocopy will delete it on E:.  It will copy permissions etc.  /R:0 means it will move on if it fails to copy a file instead of retrying. /W:0 means it won't wait to retry, it will just move on.
You can use the /L switch to setup some detailed logging.
0
 

Author Comment

by:menreeq
ID: 19578716
What happens when a file is deleted on the source directory - does this script also delete the file on the destination directory?
0
 
LVL 11

Expert Comment

by:Zenith63
ID: 19581121
If a file is deleted in the source directory Robocopy will delete it from the destination.  However if a file is deleted in the destination Robocopy will NOT delete it in the source, instead it will copy the file from the source to the destination.  This is because Robocopy is meant more for backup/data-transfer then 2 way synchronisation.
0
 

Author Comment

by:menreeq
ID: 19604404
Thanks Everyone.  I found the VIce Versa application to be the easiest to implement and monitor.  All good answers though - hope I was fair w/the point distribution.  
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question