diggory (6th May 2009)
Hi all,
Hope your enjoying the little darlings going back!
Does anyone happen to use or have used Robocopy, i am aware it is very popular however up until now we have not been able to use it because it was FREE, they would rather pay then get something for free...!
We are looking into using it for a simple copy from source A to source B, has anyone got any tips or have any templates which we could have a look at.
We have downloaded the resource kit etc, however time is against us unfortunately! :cry:
Cheers,
There's a gui for it (google robocopy gui), but just list the commands, it's not as complex as it looks.
Thanks Mark,Originally Posted by mark
I have had at the GUI and that seems okay for the time being, however we would like to get into the full blown Robocopy.
To be honest we are fine with listing the commands etc, it's mainly the first command line where we are having problems, such as telling it the source and destination information.
Any help from anyone would be apprechiated.
What do you need to do?
Robocopy is a really great tool, the command syntax is a bit tricky until you get used to it.
Just migrated all our user accounts with a robocopy script & have a few example scripts available, could PM you one if needed.
Rob
That would be really helpful actually Rob, basically we need to copy about 100 gig's of data from one drive to another, however when using windows explorer etc it keeps flagging up errors and the files get scanned by Sophos and keep getting blocked. We just need a script which we can input our source and destination info in etc for now and then look at making our own for future projects etc.Originally Posted by robk
An example script would be really helpful.
Errr, just stop Sophos then ?and the files get scanned by Sophos and keep getting blocked.
When ever I do a large file copy I normally use Xcopy but then only do the copy in stages, not as one job lot. . . . OK it takes a bit more time but at least you have an element of control.
A few examples which may help:
Copy files from one server to another
ROBOCOPY \\Server1\reports \\Server2\backup *.doc /S /NP
List all files over 32 MBytes in size
ROBOCOPY C:\work /MAX:33554432 /L
Move files over 14 days old
ROBOCOPY C:\work C:\destination /move /minage:14
The MOVE option will fail if any files are open and locked.
diggory (6th May 2009)
I would love to stop Sophos, however, that is not an option under the LEA agreement, plus it's the LEA that control that server, meaning we can't adjust things to work properly!Originally Posted by mattx
So who enters the command for the robocopy ?it's the LEA that control that server
If its you, then you could do a net stop on the sophos service...
I am one of the team which will be handling the Robocopy however with Sophos, as it is connected to the sophos console server it flags an alert up stating an issue with Sophos, in turn telling the LEA that where up to something.Originally Posted by mattx
Not that i have ever tried that before, never...wouldn't even think of it! heheehe
Thanks for the example though, any more would be much apprechiated.
I used the following to copy our home dirs back from external USB drive ready after a server rebuild. G is the usb drive, e the data drive. the /COPYOriginally Posted by acrobson
stops the file permissions being changed. The default from memory is DAT which copies Atributes and ACLS.
robocopy g:\ e:\ /COPY/xd g:\recycler /xd "g:\System Volume Information" /xo /e /zb /R:5 /LOG:"g:\restore.log" /TEE /w:1
Note that robocopy can be restarted so you can look at the log, remove a problem file and re-start. Hope this helps. PM me if you need more.
Hi people,
Just a quick thanks for you help on this one, I have finally managed to get it sorted, what a great piece of kit. I have seen it in use previously, but didn't understand its true potential.
I am wondering if it would be worth me publishing a couple of template scripts for other Robocopy newbies to download etc.
Cheers,
Wouldn't hurt and I'd certainly appreciate it as I'm getting ready to do some work with this myself..Originally Posted by acrobson
As mentioned, here are a few scripts which I have used and adapted, they have all worked fine for me recently.
Note: You need Windows XP Resource Kit installed for the robocopy.exe
This script copies from source drive to destination drive, the /XF *.? is where you can define file types which you do not wish to be copied, such as .xls etc.
The /XD excludes directories matching given names/paths.
The /XO excludes items with the age older or the same date/time stamp. The /E copies subfolders, including Empty Subfolders.
The /ZB uses restartable mode; if access denied use Backup mode.
The /ETA displays the progress in the out file.
The /R:1 states the time length in which to wait on a fail copy in which to re-try.
The /W: defines the time in which to wait between retries.
robocopy l:\source g:\destination /COPY/XF *.? /xd l:\Source /xd l:\Source /xo /e /zb /ETA /R:5 l:\restore.log /TEE /W:1
The following script is similar to above, however it has the /XD removed which enables you to exclude certain file types etc.
robocopy l:\Support g:\Support /COPY/xd l:\Support /xd l:\Support /xo /e /zb/R:5 l:\restore.log /TEE /W:1
Once you have customised you source and destination locations, you can enter either of these into you cmd box for robocopy and they should work.
If anyone has any additional scripts, such as more complex ones, please share them.
The easy way.
Use ntbackup, backup to a file (fast), restore the backup to a new location with all permissions correct. This is about 10 - 20 x faster than robo copy.
This is my first post to the forums - just want to say that ROBOCOPY is a wonderful tool. I use it alot for script-based copy jobs (like rolling out start menu changes to the global desktop areas and such).
Something to look at however - read up on the /COPYALL switch, if you want to preserve file attributes/NTFS ACLs and such - you will want to use that switch.![]()
diggory (6th May 2009)
There are currently 1 users browsing this thread. (0 members and 1 guests)