Solved

Robocopy - Don't Enable Shares

Posted on 2013-11-23
1
562 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
1 Comment
 
LVL 35

Accepted Solution

by:
Mahesh earned 300 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

We recently had an issue where out of nowhere, end users started indicating that their logins to our terminal server were just showing a "blank screen." After checking the usual suspects -- profiles, shell=explorer.exe in the registry, userinit.exe,…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now