XCOPY depreiated, use ROBOCOPY

  • I have found that XCOPY has been depreciated in Windows Server 2008 and we should be using ROBOCOPY.

    Can anyone point me toward more documentation on ROBOCOPY? I have found the documentation regarding the various command line options and such, but there isn't much info on how ROBOCOPY can be used.

  • I've not seen much beyond the command line options myself, that being said I use robocopy pretty much exclusively when performing file transfers across the network. The ability to have the copy restartable and automatically retry (for those times when the 50GB file transfer dies 90% of the way through) is invaluable.

    There are a couple of sites with comparisons of XCopy and Robocopy which might be more helpful. http://www.xxcopy.com/xxcopy30.htm



    Shamless self promotion - read my blog http://sirsql.net

  • Nicholas Cain (2/9/2010)


    I've not seen much beyond the command line options myself, that being said I use robocopy pretty much exclusively when performing file transfers across the network. The ability to have the copy restartable and automatically retry (for those times when the 50GB file transfer dies 90% of the way through) is invaluable.

    There are a couple of sites with comparisons of XCopy and Robocopy which might be more helpful. http://www.xxcopy.com/xxcopy30.htm

    Oh well, can't get there from here. Will have to check it out from home.

  • While you're looking at robocopy, you might want to look at forfiles.exe also.

    On most of our new servers, we have enough space to maintain several days backup history, so I backup to the local server and use ROBOCOPY /MIR to mirrow the directory to a backup file server.

    On the older servers, I just backup the last days backup locally, and use forfiles to delete the old files.

    If you want to see the batch files I use, let me know.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • There's a GUI tool on Technet that will help you generate scripts for RoboCopy.

    http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx?pr=blog



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • I have to say, I did get very upset when they posted a GUI for Robocopy...that just seems wrong.

    /MIR is great

    /LOG is the same, there is also code out there for parsing the log and reporting errors back to SQL

    One of my favourite things is to watch the file copy percentage increase. Yes, it's like watching paint dry but it's totally fascinating, wasted too much time with that.



    Shamless self promotion - read my blog http://sirsql.net

  • Anyone know if PowerShell can do the same things as RoboCopy?



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Found some additional documentation in the Windows Server 2003 Resource Kit Tools download.

    I have configured a scheduled task on a Windows Server 2008 Server that will start when the server starts that will run ROBOCOPY in monitor mode checking for new backup files to be moved to a remote file server.

    Tests look really good. Will need to do additional tests once I get the mirror failover processing setup.

    Thanks for the feedback.

  • Ah yes. Robocopy making a comeback after so many years.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Alvin Ramard (2/9/2010)


    Anyone know if PowerShell can do the same things as RoboCopy?

    No - and I really don't understand why they did not build that functionality into it. I am also quite disappointed in the fact that they have not (yet) built a cmdlet that can be used to run Robocopy.

    With that said, you can go to this site: http://thepowershellguy.com/blogs/posh/archive/2008/10/01/powershell-and-robocopy-part-5.aspx to see how it can be wrapped and executed from Powershell.

    I took the ideas from that site and built a script that I can use, but I haven't actually looked at it recently since I haven't had a requirement to copy a lot of files anywhere.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Jeffrey Williams-493691 (2/9/2010)


    Alvin Ramard (2/9/2010)


    Anyone know if PowerShell can do the same things as RoboCopy?

    No - and I really don't understand why they did not build that functionality into it. I am also quite disappointed in the fact that they have not (yet) built a cmdlet that can be used to run Robocopy.

    With that said, you can go to this site: http://thepowershellguy.com/blogs/posh/archive/2008/10/01/powershell-and-robocopy-part-5.aspx to see how it can be wrapped and executed from Powershell.

    I took the ideas from that site and built a script that I can use, but I haven't actually looked at it recently since I haven't had a requirement to copy a lot of files anywhere.

    Thanks. I was hoping I'd only have to learn one new tool. Oh well.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • I don't know what the fuss is about. Kill off something well documented and well understood, introduce something we all thought was lost when the ark struck ground (without any useful documentation) and hope the customers remain happy: standard MS practice - someone somewhere in the development hierarchy (or the sales hierarchy maybe) has a bee in their bonnet, and to hell with sanity.

    Or is it not quite as bad as that?

    edit: spelling

    Tom

  • I did not realize that XCOPY was going away. I better start reading up and converting over to ROBOCOPY then.

  • Lynn Pettis (2/9/2010)


    I have found that XCOPY has been depreciated in Windows Server 2008 and we should be using ROBOCOPY.

    Can anyone point me toward more documentation on ROBOCOPY? I have found the documentation regarding the various command line options and such, but there isn't much info on how ROBOCOPY can be used.

    Heh... glad to see that Microsoft is still deprecating the most useful tools first. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Robocopy's great, use it as part of a log shipping solution, I'd recommend not implementing any logging if moving large files though...

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply