?
Solved

Robocopy - Don't Enable Shares

Posted on 2013-11-23
1
Medium Priority
?
584 Views
Last Modified: 2013-11-23
I am migrating a server over.  I want to copy over all data from \\SERV1\USERS to \\SERV2\USERS.  (I want security rights preserved, everything in subdirectories copied as well, etc).  On SERV1 it is a shared folder.  I don't want to share it YET on SERV2.  That way I can come in on Monday, and just copy over any changes and be good to go, then share those folders on the new server.

What is my robocopy command?

Thank you.
0
Comment
Question by:dougp23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 37

Accepted Solution

by:
Mahesh earned 1200 total points
ID: 39671791
Use below command

robocopy \\server1\share1 \\server2\share2 /e /zb /copyall /mir /sec /secfix /fp /log+:C:\log.txt

switches used:
 /e - copy all directory including empty once
/zb - use restartable mode; if access denied use Backup mode
/copyall - COPY ALL file info
/mir - MIRror a directory tree (equivalent to /E plus /PURGE)
/sec - copy files with SECurity (equivalent to /COPY:DATS)
/secfix - FIX file SECurity on all files, even skipped files
/fp - include Full Pathname of files in the output.
/log+ - output status to LOG file (append to existing log).

Replace souce and destination with actual once and chnage log file path if required.
Also if there is space in share folder name then enclose shared folder path in " " at both source and destination locations.

The command will ensure that folder gets copied along with all sub folders and files with all security permissions in recursive mode and generate log file for record.
After initial copy, when you run same command 2nd time it will just copy incremental changes

Please execute Robocopy command from win 7 SP1 or windows 2008 R2 SP1 with elevated command prompt

Mahesh
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question