Solved

Robocopy - Don't Enable Shares

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

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Disable NetBios Seeting via Group Policy 6 189
SBS 2007 remove AD ? 10 61
Active Directory uninstall Windows 2008 R2 6 84
Robocopy all drives in windows 2 26
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
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…

770 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