Finally the help of IT is here

Blog of computer solutions.

Copying files between Windows servers ROBOCOPY

Written by Alex Nalda on December 18th, 2011

Good to [Email protected],

Today I will explain how to transfer data from a server (either DC or member) in one domain to another server in the domain, either for purposes of migration or just by expansion of server space, since there are still admins working with Windows infrastructure 2000 server and can at this point for excess storage by users on the server, it has fallen short of capacity.

Well, we'll do with a little utility called Robocopy (Robust File and Folder Copy). This is a command included in the Resource kit Windows, which is useful for us to copy files and folders, so far nothing new.

The potential of this application is that it is very versatile; you can tell that you delete the source from which you are copying, or copying a file fails, we can tell you to try X times and we can also define the waiting time between attempted and try, ... etc. The good thing that all this completely automatically and with a simple command line you made.

first install the Resource Kit is installed by default in C: \ Program Files \ Windows Resource Kits \ Tools

Thereupon we open the console from HomeRun and type "Cmd". Once inside we look for the old path "C: \ Program Files \ Windows Resource Kits \ Tools"And from there we would put for instance ... ..:

ROBOCOPY Server1 \\ \ C $ \\ Server2 \ F $ \ BACKUP / S / E / COPYALL / MIR / R: 2 / W: 2 /LOG:F:\BACKUP\COPIA1.TXT

First things first steps:

ROBOCOPY source destination

/ S (copy subdirectories)
/ E (copy subdirectories including empty ones)
/ COPYALL (copy all the information attached to the files, NTFS permissions, etc.)
/ MIR (create the same directory tree to the source)
/ R: 2 (two retries if it fails to copy the file)
/ W: 2 (waiting time between each attempt, in this case 2 seconds)
/ LOG: F: \ BACKUP \ COPIA1.TXT (path and file that is created for the log)

All this can be included in a .bat and thus run a scheduled running the .bat each x time job ...

Some will ask, and permits Share? Robocopy because the copy NTFS but not Share .... for it then we have another application that gives Microsoft called Permcopy also included in the Resource Kit that does is trace the share permissions for shared folders that have on the source server.

To find out which folders have execute permissions share from the console:

net share> d: \ share.txt

What we do with this command is included in the file share.txt show us what share folders have permissions. Knowing this, we can run the backup and folder permissions for.


PERMCOPY \ \ ServidorOrigen nombre_de_la_carpeta_share \ \ ServidorDestino nombre_de_la_carpeta_share

Voilà, in seconds have a carbon copy of all permits in the new Server.

Well, that's all. Until next time!

Related Posts Plugin for WordPress, Blogger ...
Tags: , , , , , , ,

3 Responses to "Copy files between Windows servers ROBOCOPY"

  1. xavixaus Says:

    Very good Alex.

    I use the Robocopy for years, and higher versions 2003 and is already included with the operating system.

    The program PERMCOPY did not know and for the shares we were doing an export to a file and then we imported with a script that put the shares to each of the directories.

    This will speed up the job when we do data migration server. We use it a lot to migrate data from an old server to new one.

    Thank you very much for the contribution.

  2. Alex Nalda Says:

    Thanks Xavi.
    Anyway, since you used ROBOCOPY deduced but when I heard the PERMCOPY saw the need and how they post it very close ..... For nothing to share! . I'm glad you serve, that's what we are. Embrace!

  3. Berenice Says:

    Hi good day
    the second part of the percopy not understood, if for example and pass all my folders are corpartidas, as I use the percopy, that are shared.
    and robocopy command does not erase me what I have on my drive home?

    Thank you

Leave a Reply

XHTML: You can use in Original tags: <a href="" title=""> <abbr title = ""> <acronym title = ""> <b> <blockquote cite = ""> <cite> <code> <del datetime = ""> <em> <i> <q cite = ""> <s> <strike> <strong>

GTranslate Your license is inactive or expired, please subscribe again!