Robocopy over RDP

Posted by Garth on Tuesday, December 2, 2008

In trying to upload the Dos Gringos website to the webserver over RDP today I became extremely frustrated.  Suffice it to say that internet connections from Thailand to the US aren't the most reliable in the world.  Combine that with the retarded overhead that copying files through RDP's Explorer interface introduce and you're in for a world of hurt.  Timeouts, failures, and just general headache inducing crap.  So I thought to myself, "Self, there must be a better way.  What about Robocopy?  It's never failed you in the past."  And you know what?  My self was right.  After a bit of googling I found this excellent post on how to backup your files using Remote Desktop.  I'm gonna quote the author here as he succinctly describes what I was going through:

I hate using explorer to copy a large number of files. Why? Because most of the time it will fail half way through the copy - with no way to resume.
His post goes into much more detail than mine does, but if you want the Reader's Digest version, here it is...

Use \\tsclient\ to reference the drives that are mapped over RDP.  So if you're copying C:\Temp you'd use \\tsclient\c\temp.  That's it.  Thanks Steve!

For your reference, these are the other switches I use:
/mir /r:1 /np /log:"filename.log" /tee

If I had large files that I was copying I'd also use /zb.  Hope this helps someone out there.


)uffm@n said...

Nice technique. I have been a robocopy convert since you introduced me to it in 2000. It was the first tool I put on my COE image & I use it for several backup tasks here.

The best one - I run a dummy robocopy (scan only - no actual copying) - and use the generated logfile in Perl to find new/modified/deleted files. Then I copy these files to a dated snapshot directory before running the actual copy to mirror source & dest.

Best. Program. Ever.

Subscribe to: Post Comments (Atom)