Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Quick and Dirty DR Solution Using Robocopy Expand / Collapse
Author
Message
Posted Sunday, November 6, 2011 1:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 8, 2014 1:18 PM
Points: 2,664, Visits: 830
Comments posted to this topic are about the item Quick and Dirty DR Solution Using Robocopy



Scott Duncan

MARCUS. Why dost thou laugh? It fits not with this hour.
TITUS. Why, I have not another tear to shed;
--Titus Andronicus, William Shakespeare
Post #1201121
Posted Monday, November 7, 2011 3:45 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, August 4, 2012 3:09 AM
Points: 2, Visits: 2
On top of using RoboCopy, use RoboCopyPlus, which will let you email job results with condensed logfile, and inserts entries in the windows eventlog with job result error levels.
See www.robocopyplus.com
Post #1201298
Posted Monday, November 7, 2011 4:58 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 8:59 AM
Points: 42, Visits: 178
Be aware that using the /z switch (restartable mode) for Robocopy slows it down massively cant tell you how much but something like half speed. You are better off not using /z in general and just recopying the whole file again in the rare event it fails part way through.

I have just been doing something identical to this but I found Robocopy to be far too slow for large files ie > 20GB. It also seems to cause file corruption (silently) somewhere in the range 30GB to 70GB. I can copy 30GB files but not 70GB files. You can prove that a file is identical (or not) easily using the Microsoft utility called FCIV which creates a hash value for a file:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11533

There is a much quicker way to copy very large files using a Microsoft utility called ESEUTIL. I have just spent my entire weekend migrating 280GB of backup files across a network using this. It runs much faster than robocopy and does not corrupt the files.

Don’t believe me about ESEUTIL? See this for evidence that using ESEUTIL is a sensible thing to do (bottom of page post by Jacob Luebbers Posted 5/22/2008 2:05 AM:

http://www.sqlservercentral.com/Forums/Topic495042-357-1.aspx

(also see the other posts he refers to – I have seen other posts on same topic too)
Post #1201313
Posted Monday, November 7, 2011 6:07 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 1:24 AM
Points: 979, Visits: 941
That is a nice, thank you.

I am using something simmilar but through windows tasks.

Iulian
Post #1201358
Posted Monday, November 7, 2011 8:14 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, September 19, 2014 4:40 PM
Points: 361, Visits: 873
Be careful with using Robocopy on large files - it uses buffered IO functions in the Windows API which can lead to massive paging and negatively impact SQL Server performance.

These two blog posts explain buffered vs. unbuffered IO in greater detail:

http://blogs.msdn.com/b/granth/archive/2010/05/10/how-to-copy-very-large-files-across-a-slow-or-unreliable-network.aspx
http://blogs.technet.com/b/askperf/archive/2007/05/08/slow-large-file-copy-issues.aspx

The articles also talk about other tools which copy files using unbuffered IO as an alternative to robocopy.


Kendal Van Dyke
http://kendalvandyke.blogspot.com/
Post #1201456
Posted Monday, November 7, 2011 12:06 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 8, 2014 1:18 PM
Points: 2,664, Visits: 830
Sean Elliott (UK) (11/7/2011)
Be aware that using the /z switch (restartable mode) for Robocopy slows it down massively cant tell you how much but something like half speed. You are better off not using /z in general and just recopying the whole file again in the rare event it fails part way through.

I have just been doing something identical to this but I found Robocopy to be far too slow for large files ie > 20GB. It also seems to cause file corruption (silently) somewhere in the range 30GB to 70GB. I can copy 30GB files but not 70GB files. You can prove that a file is identical (or not) easily using the Microsoft utility called FCIV which creates a hash value for a file:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11533

There is a much quicker way to copy very large files using a Microsoft utility called ESEUTIL. I have just spent my entire weekend migrating 280GB of backup files across a network using this. It runs much faster than robocopy and does not corrupt the files.

Don’t believe me about ESEUTIL? See this for evidence that using ESEUTIL is a sensible thing to do (bottom of page post by Jacob Luebbers Posted 5/22/2008 2:05 AM:

http://www.sqlservercentral.com/Forums/Topic495042-357-1.aspx

(also see the other posts he refers to – I have seen other posts on same topic too)


I've heard about ESEUTIL but never been able to get my hands on a copy to try it out.




Scott Duncan

MARCUS. Why dost thou laugh? It fits not with this hour.
TITUS. Why, I have not another tear to shed;
--Titus Andronicus, William Shakespeare
Post #1201630
Posted Monday, November 7, 2011 1:50 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 10:34 AM
Points: 436, Visits: 2,285
I thought RichCopy replaced RoboCopy as the copy utility of choice. Or am I comparing apples and oranges?


Cursors are useful if you don't know SQL
Post #1201678
Posted Monday, November 7, 2011 2:39 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 8:59 AM
Points: 42, Visits: 178
You can get eseutil from the web if you look via google "eseutil download". It's installed with MS Exchange but all you need is 2 files eseutil.exe and eseutil.dll and they are small.
If you are on W2k8 you can use xcopy with the new /j flag which does the same type of unbuffered copying apparently. I'm not on w2k8.

Post #1201704
Posted Wednesday, November 9, 2011 12:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 19, 2012 12:02 PM
Points: 3, Visits: 37
Guys,

Considering an online database, with users transactioning on it, is this procedure able to create a copy of the database that I can use on another server?

For instance, if server1 crashes and I try to attach the copy on server2 using the file I've synced this way, is this going to work?

Regards
Post #1203160
Posted Thursday, November 10, 2011 6:58 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 8:59 AM
Points: 42, Visits: 178
Yes the copy will work OK so long as server1 and server2 are both not using the mdf and ldf files whilst they are copying over.

Note that mdf and ldf files are many times larger than a backup especially if backup compression is used. You would be advised to zip (ie compress) the files before copying them across the network.

It might be the case that server2 will already need to have previously had the same database online so that it already knows which ndf and ldf to use. Recovery might not happen when attaching databases (I could be wrong). Recovery will definitly work if SQL is started with the right files in the right place ie as it has previously known.

Try it.
Post #1203501
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse