Latest Version of Microsoft Robocopy GUI Download Use Robocopy to Pre-Seed Files for DFS Replication
Total Page:16
File Type:pdf, Size:1020Kb
latest version of Microsoft Robocopy GUI download Use Robocopy to pre-seed files for DFS Replication. This topic explains how to use the command-line tool, Robocopy.exe , to pre-seed files when setting up replication for Distributed File System (DFS) Replication (also known as DFSR or DFS-R) in Windows Server. By pre-seeding files before you set up DFS Replication, add a new replication partner, or replace a server, you can speed up initial synchronization and enable cloning of the DFS Replication database in Windows Server 2012 R2. The Robocopy method is one of several pre-seeding methods; for an overview, see Step 1: pre-seed files for DFS Replication. The Robocopy (Robust File Copy) command-line utility is included with Windows Server. The utility provides extensive options that include copying security, backup API support, retry capabilities, and logging. Later versions include multi-threading and un-buffered I/O support. Robocopy does not copy exclusively locked files. If users tend to lock many files for long periods on your file servers, consider using a different pre-seeding method. pre-seeding does not require a perfect match between file lists on the source and destination servers, but the more files that do not exist when initial synchronization is performed for DFS Replication, the less effective pre-seeding is. To minimize lock conflicts, use Robocopy during non-peak hours for your organization. Always examine the Robocopy logs after pre-seeding to ensure that you understand which files were skipped because of exclusive locks. To use Robocopy to pre-seed files for DFS Replication, follow these steps: Prerequisites. Because pre-seeding does not directly involve DFS Replication, you only need to meet the requirements for performing a file copy with Robocopy. You need an account that's a member of the local Administrators group on both the source and destination servers. Install the most recent version of Robocopy on the server that you will use to copy the files—either the source server or the destination server; you will need to install the most recent version for the operating system version. For instructions, see Step 2: Stabilize files that will be replicated. Unless you are pre-seeding files from a server running Windows Server 2003 R2, you can run Robocopy on either the source or destination server. The destination server, which typically has the more recent operating system version, gives you access to the most recent version of Robocopy. Ensure that sufficient storage space is available on the destination drive. Do not create a folder on the path that you plan to copy to: Robocopy must create the root folder. When you decide how much space to allocate for the pre-seeded files, consider expected data growth over time and storage requirements for DFS Replication. For planning help, see Edit the Quota Size of the Staging Folder and Conflict and Deleted Folder in Managing DFS Replication. On the source server, optionally install Process Monitor or Process Explorer, which you can use to check for applications that are locking files. For download information, see Process Monitor and Process Explorer. Step 1: Download and install the latest version of Robocopy. Before you use Robocopy to pre-seed files, you should download and install the latest version of Robocopy.exe . This ensures that DFS Replication doesn't skip files because of issues within Robocopy's shipping versions. The source for the latest compatible Robocopy version depends on the version of Windows Server that is running on the server. For information about downloading the hotfix with the most recent version of Robocopy for Windows Server 2008 R2 or Windows Server 2008, see List of currently available hotfixes for Distributed File System (DFS) technologies in Windows Server 2008 and in Windows Server 2008 R2. Alternatively, you can locate and install the latest hotfix for an operating system by taking the following steps. Locate and install the latest version of Robocopy for a specific version of Windows Server. In Search Support , enter the following string, replacing <operating system version> with the appropriate operating system, then press the Enter key: robocopy.exe kbqfe "<operating system version>" For example, enter robocopy.exe kbqfe "Windows Server 2008 R2" . Locate and download the hotfix with the highest ID number (that is, the latest version). Install the hotfix on the server. Step 2: Stabilize files that will be replicated. After you install the latest version of Robocopy on the server, you should prevent locked files from blocking copying by using the methods described in the following table. Most applications do not exclusively lock files. However, during normal operations, a small percentage of files might be locked on file servers. Consider temporarily setting Read-only access on the file shares that will be replicated by using the Windows PowerShell Grant-SmbShareAccess and Close-SmbSession cmdlets. If you set permissions for a common group such as Everyone or Authenticated Users to READ, standard users might be less likely to open files with exclusive locks (if their applications detect the Read-only access when files are opened). Step 3: Copy the replicated files to the destination server. After you minimize locks on the files that will be replicated, you can pre-seed the files from the source server to the destination server. You can run Robocopy on either the source computer or the destination computer. The following procedure describes running Robocopy on the destination server, which typically is running a more recent operating system, to take advantage of any additional Robocopy capabilities that the more recent operating system might provide. pre-seed the replicated files onto the destination server with Robocopy. Sign in to the destination server with an account that's a member of the local Administrators group on both the source and destination servers. Open an elevated command prompt. To pre-seed the files from the source to destination server, run the following command, substituting your own source, destination, and log file paths for the bracketed values: This command copies all contents of the source folder to the destination folder, with the following parameters: For example, the following command replicates files from the source replicated folder, E:\RF01, to data drive D on the destination server: We recommend that you use the parameters described above when you use Robocopy to pre-seed files for DFS Replication. However, you can change some of their values or add additional parameters. For example, you might find out through testing that you have the capacity to set a higher value (thread count) for the /MT parameter. Also, if you'll primarily replicate larger files, you might be able to increase copy performance by adding the /j option for unbuffered I/O. For more information about Robocopy parameters, see the Robocopy command-line reference. To avoid potential data loss when you use Robocopy to pre-seed files for DFS Replication, do not make the following changes to the recommended parameters: Do not use the /mir parameter (that mirrors a directory tree) or the /mov parameter (that moves the files, then deletes them from the source). Do not remove the /e , /b , and /copyall options. After copying completes, examine the log for any errors or skipped files. Use Robocopy to copy any skipped files individually instead of recopying the entire set of files. If files were skipped because of exclusive locks, either try copying individual files with Robocopy later, or accept that those files will require over-the-wire replication by DFS Replication during initial synchronization. Next step. After you complete the initial copy, and use Robocopy to resolve issues with as many skipped files as possible, you will use the Get-DfsrFileHash cmdlet in Windows PowerShell or the Dfsrdiag command to validate the pre-seeded files by comparing file hashes on the source and destination servers. For detailed instructions, see Step 2: Validate pre-seeded Files for DFS Replication. Use Robocopy to Preseed Files for DFS Replication. This topic explains how to use the command-line tool Robocopy.exe to preseed files when setting up replication for Distributed File System (DFS) Replication (also known as DFSR or DFS-R) in Windows Server. By preseeding files before you set up DFS Replication, add a new replication partner, or replace a server, you can speed up initial synchronization and enable cloning of the DFS Replication database in Windows Server 2012 R2. The Robocopy method is one of several preseeding methods; for an overview, see Step 1: Preseed Files for DFS Replication. The Robocopy (Robust File Copy) command-line utility is included with Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, and Windows Server 2008. The utility provides extensive options that include copying security, backup API support, retry capabilities, and logging. Later versions include multi-threading and un-buffered I/O support. Robocopy does not copy exclusively locked files. If users tend to lock many files for long periods on your file servers, consider using a different preseeding method. Preseeding does not require a perfect match between file lists on the source and destination servers, but the more files that do not exist when initial synchronization is performed for DFS Replication, the less effective preseeding is. To minimize lock conflicts, use Robocopy during non-peak hours for your organization. Always examine the Robocopy logs after preseeding to ensure that you understand which files were skipped because of exclusive locks. Preseeding files for DFS Replication by using Robocopy involves the following steps: Prerequisites. Because preseeding does not directly involve DFS Replication, you need only meet the requirements for performing a file copy by using Robocopy: You will need to use an account that is a member of the local Administrators group on both the source server and the destination server.