Solved

Copying files from one server to another with robocopy using /MIR function.....

Posted on 2013-11-14
4
729 Views
Last Modified: 2013-11-18
hi guys,

We have an old server 2003 connected to a SAN. We also have a virtualised system, with a file server on Windows 2008 R2 and connected to a SAN.

I've so far managed to copy many TB's of information from the old on to the new. And I'm running a script every single night, that then goes and copies files from the old server on to the new one. Then at night, the new server content is backed up. This is all so that I can get the system ready to revert to the new one soon.

However, on the robocopy script I'm using the /MIR function. As an example:

ROBOCOPY "\\192.168.11.35\IT" "\\172.25.241.10\F$\IT" /MIR /COPY:DATS /r:1 /log:c:\IT.txt

But then last night, someone ended up deleting what was on the old server. So the script ran after and then it had disappeared off the new one. At least we had a backup from the night before.

I wanted to mirror, so that only the changes are copied over across and it reduces the amount of time it takes to copy things over.

My question is, until the new server is implemented, would this also be your solution? What method would you implement to reduce the chances of any such mishaps?

Thanks
Yashy
0
Comment
Question by:Yashy
4 Comments
 
LVL 24

Assisted Solution

by:Sandeshdubey
Sandeshdubey earned 100 total points
ID: 39650342
robocopy C:\Data\Share D:\Share /e /r:1 /w:1 /zb /secfix /tee /log:C:\log.txt  --Copy with securityfix
0
 
LVL 42

Assisted Solution

by:kevinhsieh
kevinhsieh earned 100 total points
ID: 39650375
The question is, do you want do you want the target to look exactly like the source, or do you want files that get deleted on the source to get deleted on the target? You may not want files to get "resurrected" on the new server, or for files to be in an old location. I would normally do /mir like you are. If you just want to copy over files and don't mind if there are "extra" files, use /e instead.

Since your old and new file servers are both connected to the SAN, you may be able to just detach the SAN volume(s) from the old server and attach them to the new VM. You wouldn't need to copy the data at all. I do this all the time with iSCSI connected SAN volumes. You can attach the volume directly to the guest, or attach to the hypervisor and do a pass-through or raw device mapping to the guest.
0
 
LVL 25

Accepted Solution

by:
Coralon earned 300 total points
ID: 39652792
Well your robocopy did exactly what you told it to.  Given what you are trying to do, and depending on your time frame...

I'd probably switch to doing a nightly regular robocopy, and then a weekly robocopy with the /mir switch.

Robocopy is going to definitely minimize the copy time and only copy the changed files (that's its purpose).

So... based on what you put:

Nightly:
ROBOCOPY /e "\\192.168.11.35\IT" "\\172.25.241.10\F$\IT" /COPY:DATS /r:1 /w:1 /log:c:\IT.txt

Open in new window


Weekly:
ROBOCOPY /e "\\192.168.11.35\IT" "\\172.25.241.10\F$\IT" /mir /COPY:DATS /r:1 /w:1 /log:c:\IT.txt

Open in new window


If you wanted to be more cautious, you could put in a test file in the source directory.

if exist (\\192.168.11.35\it\test.txt) do ROBOCOPY /e "\\192.168.11.35\IT" "\\172.25.241.10\F$\IT" /COPY:DATS /r:1 /w:1 /log:c:\IT.txt

Open in new window



Coralon
0
 
LVL 1

Author Comment

by:Yashy
ID: 39656763
Awesome guys, thank you so much.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change administrator password on server 13 95
Locating a GPO setting 3 42
windows event log error 1000 DSM what does this mean? 5 47
Corrupt / Encrypted Word Documents 6 33
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

820 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