Robocopy una potente utilidad de copia de archivos y directorios que como veremos en este vídeo, incluso transfiere las configuraciones de seguridad ACL y. Re: Windows Server 2012 R2 Robocopy to migrate file server? ok, if im reading/understanding you, then i think that the these articles (particularly the blog link. So I have a batch script for robocopy. Running this from the command line does exactly what I want. robocopy 'D:\SQL Backup' \\server1\Backup$\daily /mir /s /copyall. Robocopy, is a command-line directory/file replication command. By default Robocopy will only copy a file if the source and destination have different time stamps or. Depending on the complexity of your DFS deployment, a migration from Server 2003 to Server 2012 R2 can be straightforward or frighteningly complex.
Migrating File Servers from Windows Server 2. Windows Server 2. R2. Introduction. If you have SMB File Servers running Windows Server 2. OS will end on July 1. You can read more about this at: http: //blogs. If you’re still using Windows Server 2.
The easiest path to migrate an old SMB File Server would be to use a virtual machine to replace your old box and move the data to the new VM. While it is fairly straightforward to perform the migration, you do have to be careful about it, since it does mean moving data around and requires at least a little bit of down time. I’m glad you’re reading this, since it indicates you’re taking the steps to retire your old server before it falls out of support. The Steps. To test this migration scenario, I configured a 3. Windows Server 2. I called FILES) and a Hyper- V virtual machine running Windows Server 2. R2. I also configured a domain controller running Windows Server 2.
This last video in the series covers the migration of a basic file server with DAS storage, but the pricipals can be used when having SAN attached storage.
R2 and joined both machines to a single domain. In general, here are the steps I used to test and capture the details on how to perform the migration: Configure accounts/groups in Active Directory *Configure your WS2. Prepare for migration (initial data copy prior to final migration)Export the share information. Changes happen after Step 3 *Rename Windows Server 2. Final data migration pass. Create shares at the destination. Rename the WS2. 01.
R2. Verify you are all done. Items marked with * are needed only for simulation purposes and should not be executed in your existing environment already running a Windows Server 2. File Server. Find below the details for each of the steps above.
Note that I tried to capture the commands I used in my environment, but you will obviously need to adjust the server names and paths as required in your specific configuration. Step 1 – Configure accounts/groups in Active Directory. This step creates the several users and groups for the domain that we’ll use in the script. This step should be run from an elevated Power. Shell prompt on the test domain controller running Windows Server 2.
In 'Add Robocopy to Your Toolbelt,' September 2005, I introduced you to one of the Microsoft Windows Server 2003 Resource Kit's most useful and powerful.
R2. Older Windows Server versions for the DC are fine, but I cannot vouch the Power. Shell below working on all older versions.
IMPORTANT: These commands should only be used for a test environment simulation. Do not run on your production environment.$cred = get- credential. New- ADUser - Name User$_ - Account. Password $cred. password - Cannot.
Change. Password $true - Display. Name “Test $_” - Enabled $true - Sam. Account. Name User$_ }1. New- ADGroup - Display. Name “Project $_” - Name Project$_ - Group. Category Security - Group.
Scope Global }1. 9. Group = $_; 1. 9. Get- ADGroup Project$Group | Add- ADGroup. Member - Members User$_ } }Step 2 – Configure your WS2. This step creates several folders and shares, with different permissions at the share and the file system level.
This simulates a production environment and helps test that files, folders, shares and permissions are being properly migrated. This step should be run from a command prompt on the test Windows Server 2. File Server. In the script, JOSE is the name of the domain. IMPORTANT: These commands should only be used for a test environment simulation.
Do not run on your production environment. C: homefolderfor /L %%a in (1,1,9. C: homefolderuser%%afor /L %%a in (1,1,9. NET SHARE share%%a=C: homefolderuser%%a /GRANT: JOSEAdministrator,FULL /GRANT: JOSEuser%%a,FULLfor /L %%a in (1,1,9. C: homefolderuser%%a /E /G JOSEAdministrator: Ffor /L %%a in (1,1,9.
C: homefolderuser%%a /E /G JOSEuser%%a: Fmd c: projectsfor /L %%a in (1,1,9. C: projectsproject%%afor /L %%a in (1,1,9.
NET SHARE project%%a=C: projectsproject%%a /GRANT: JOSEAdministrator,FULL /GRANT: JOSEProject%%a,FULLfor /L %%a in (1,1,9. E /G JOSEAdministrator: Ffor /L %%a in (1,1,9. E /G JOSEproject%%a: Ffor /L %%a in (1,1,9. C: homefolderuser%%afor /L %%a in (1,1,9. Step 3 – Prepare for migration This step performs an initial data copy from the Windows Server 2. File Server to the Windows Server 2. R2 machine prior to the final migration.
By doing this initial copy with the old file server still accessible to users, you minimize the downtime required for the final copy. If there are issues with open files or other errors during this step, that is OK. You will have a chance to grab those files later.
You should make sure to include all the folders used for all your file shares. In this example I am assuming relevant files are in the folders called c: homefolder and c: projects. IMPORTANT: You must use the same drive letters and the exact same paths on your new Windows Server 2. R2 server. If you don’t, the share information won’t match and your migration will not work.
IMPORTANT: This migration process only works if you only use domain accounts and domain groups for your permissions. If you are using local accounts for the file share or file system permissions, the permissions will not be migrated by ROBOCOPY. In case you’re not familiar with ROCOBOPY, here are the details about the parameters used: /e – Copy subdirectories, including empty ones/xj – Exclude junction points/r: 2 – 2 retries/w: 5 – 5 second wait between retries/v – Verbose output for skipped files/it – Include tweaked files (identical size/timestamp, but different attributes)/purge – Delete destination files/directories that no longer exist in source/copyall – Copy data, attributes, timestamps, security (ACLs), owner, auditing info. Run this step at the Windows Server 2.
R2 server from an elevated command prompt. C: homefolder. ROBOCOPY /e /xj /r: 2 /w: 5 /v /it /purge /copyall \FILESc$homefolder c: homefoldermd c: projects.
ROBOCOPY /e /xj /r: 2 /w: 5 /v /it /purge /copyall \FILESc$projects c: projects. Step 4 – Export the share information This step exports the share information from the registry of the Windows Server 2.
This will include share names, share path and share security (ACLs). There are more details on this export procedure at http: //support. This command should be run from a command prompt on the test Windows Server 2.
File Server. IMPORTANT: This migration process only works if you only use domain accounts and domain groups for your permissions. If you are using local accounts for the file share or file system permissions, the permissions will not be migrated by this registry export. HKLMSYSTEMCurrent. Control. Set. Services.
Lanman. Server. Shares c: export. Step 5 – Changes happen after Step 3.
This step simulates changes being applied to the files after the initial copy in step 3. Since some time will pass between steps 3 and 6, we expect that users will still be making changes to their files and adding new files.
This simulated step makes sure the command are able to property capture those changes. This step should be run from a command prompt on the test Windows Server 2. File Server. IMPORTANT: These commands should only be used for a test environment simulation.
Do not run on your production environment. L %%a in (1,1,9. 9) do xcopy c: windowsmediar*. L %%a in (1,1,9. 9) do xcopy c: windowsmediar*. Step 6 – Rename Windows Server 2.
DOWNTIME STARTS HERE***) This step asks you to rename the Windows Server 2. This will mark the beginning of downtime for your File service. Since Windows Server 2. GUI to manually rename the machine from FILES to XFILES. This assumes that FILES is the name of the existing file server (users access data using \FILES< sharename> ) and XFILES is an unused name in your network. At this point, your FILES file server will become unavailable. If you want to automate this step, download the Support Tools from http: //www.
Windows Server 2. NETDOM RENAMECOMPUTER /NEWNAME XFILES /REBOOT /FORCEStep 7 – Final data migration pass This step copies the changes in the shares (changed files, new files) after the initial copy. Since this happens after the system is renamed and rebooted, there should be no more users in the system and there should be no further problems with files being in use during the copy. We’re using the same parameters as before and ROBOCOPY will basically copy just what changed since the initial copy.
If the initial copy was not too far back, you will have fewer changes and this step will be shorter. IMPORTANT: Since this is the last copy, you should watch for any failures and repeat the copy until there are no issues with any files you care for. Run this from the Windows Server 2. R2 server from an elevated command prompt. ROBOCOPY /e /xj /r: 2 /w: 5 /v /it /purge /copyall \XFILESc$homefolder c: homefolder. ROBOCOPY /e /xj /r: 2 /w: 5 /v /it /purge /copyall \XFILESc$projects c: projects. Step 8 – Create shares at the destination This step imports the share configuration from the Windows Server 2.
Run this from the Windows Server 2. R2 server from an elevated command prompt. XFILESc$export. reg. Step 9 – Rename the WS2.
R2 In this step, the Windows Server 2. R2 system is renamed to the same name as the old Windows Server 2. As soon as the system is rebooted, the clients will be able to access the file shares in the new system and the downtime ends. Run this from the Windows Server 2. R2 server from an elevated Power. Shell prompt. Rename- Computer - New.
Name FILES - Restart - Force. Step 1. 0 – Verify you are all done! DOWNTIME ENDS HERE***) At this point, you migration is complete and you’re basically using these commands to verify that the shares were properly migrated. The commands also sample the permissions in some of the shares and folders to verify that portion worked as well. Run this from the Windows Server 2. R2 server from an elevated Power. Shell prompt. Get- Smb.
Share. Get- Smb. Share. Access Share. 23. Get- Smb. Share. Access Project. Get- Acl c: homefolderuser. Format- List Path, Access. To. String. Get- Acl c: projectsproject. Format- List Path, Access.
To. String. Conclusion. I highly recommend that you setup a test environment before trying this on your production Windows Server 2.
File Server. You test environment should also mimic your production environment as closely as possible.