We help IT Professionals succeed at work.

Folder synch

itmstech
itmstech asked
on
Medium Priority
295 Views
Last Modified: 2010-04-03
here is the situation.

1. Computer A has a folder on it named SWL
2. Someone tried to use an xcopy script to copy folder SWL to computer B.
3. However, it did not work as they intended and now there are files on computer A that did not make it to Computer B.
4. In the mean time users have been using the copy of SWL on computer B for all their work.

How do i synchronize the two folders on two seperate machines without overwriting any data on computer B's SWL folder and making sure that files that dont exist on computer B get moved over from SWL on computer A.



Comment
Watch Question

Arrr, that fantastic method of data migration !!!

Well, you could manually check each folder and see what has changed? Use Last Accessed Date and delete anything that has not changed after your copy date. (DIR /s /OD or use something like FileSize Pro 3 or even Explorer).

Alternatively, you could start your copy off again, but using something like RoboCopy which will let you do more explicit copy commands.

Finally, you can use a reverse copy of all changed files first, then copy everything back again.

XCOPY B:\SWL /S /D:12-01-2006 A:\SWL

where A: is server A drive
B: is server B drive
SWL is folder
12-01-2006 is the date which you performed the original copy.

This assumes that noone is making changes to the files on Server A of course. If so, then you would need to copy to a seperate location to ensure data integrity.

Then, do your copy back again. Make sure you use continue on failure, and event logging so you can see what you missed.

XCOPY A:\SWL B:\SWL /E /H /R /C /O /K /Y /F >c:\copy.log

XCOPY /? to see what all the switches are but this should work. One minor point....

MAKE SURE YOUR USERS ARE ALL LOGGED OFF AND NO OPEN FILES !!!!

A good way to ensure noone does anything while you perform your network copy is to

1. ensure no open files (close any that are open)
2. ENsure noone is connected to computer other than you, and your destination computer
3. PAUSE the NETLOGON service to stop any more logins. Don't stop it or else you won't be able to do anything else.
4. Perform your copy
5. restart NETLOGON and test

Hope this helps
Barny
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
use robocopy, it is much better than xcopy. There is a doc file with all the help you need and by entering robocopy /? you also get a lot of info about the syntax. Robocopy is free and part of the resource kit tools.

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
I agree with Rindi about using Robocopy. If you want a nice GUI for syncing the files, I can recommend some shareware from Fileware called Filesync - http://www.fileware.com/public/fsync.exe
Commented:
Just to help Rindi's comment, look at this link : " http://www.ss64.com/nt/robocopy.html "

Best Regards !
SyncToy 1.2 has just been released by Microsoft.  It has a nice straight forward user interface and gives you numerous options as to how you syncronise the folders.  It is perfect for this one off task, i expect you can also schedule regular syncronises too!

For example:  copy everything from A to B, overwriting only newer files

http://www.microsoft.com/downloads/details.aspx?FamilyID=e0fc1154-c975-4814-9649-cce41af06eb7&displaylang=en


Hope this helps

Author

Commented:
Thank you for your help, Robocopy worked well and the additional information on ss64 page was helpful.

Just for everyone's knowledge, you will have to download the tools to a 2003 or xp machine and then bring the tool over to the windows 2k machine.

Commented:
Thanks for your additional input !

Best Regards !
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
Thanks
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.