Solved

Robocopy - Don't Enable Shares

Posted on 2013-11-23
1
566 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AD Replications issues 12 87
Need to build a new server.  So which is better 2008 vs 2012 3 47
SQL Server Communications Audit 5 75
PHP7 and Sql Server Windows 2008 R2 13 88
Recently, I was asked to look into SCCM 2007 by my employer, having a degree of experience of earlier versions of SMS and some previous SCCM knowledge I didn't expect the procedure to involve to much time. I read a number of guides concerning it…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

863 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

19 Experts available now in Live!

Get 1:1 Help Now