Update Scripts/Batch/Robocopy.md

This commit is contained in:
Nicole Rappe
2023-12-21 23:39:27 -07:00
parent 65c2416fe9
commit 2757354281

View File

@ -7,14 +7,15 @@ An example of using Robocopy is below, with a full breakdown:
``` ```
robocopy "E:\Source" "Z:\Destination" /Z /B /R:5 /W:5 /MT:4 /COPYALL /E robocopy "E:\Source" "Z:\Destination" /Z /B /R:5 /W:5 /MT:4 /COPYALL /E
``` ```
+ `robocopy "Source" "Destination"`: The application itself
+ `/Z` : If the network transfer is interrupted, it will resume when the network comes back online - `robocopy "Source" "Destination"` : The application itself
+ `/B` : Backup Mode - This can be used to circumvent ACLs on folders and files, just forcing them to copy bypassing permissions - `/Z` : If the network transfer is interrupted, it will resume when the network comes back online
+ `R:5` : Number of times to retry copying the same file - `/B` : Backup Mode - This can be used to circumvent ACLs on folders and files, just forcing them to copy bypassing permissions
+ `W:5` : The number of seconds to wait between retries - `R:5` : Number of times to retry copying the same file
+ `/MT:4` : *_Threaded_* copies that run on their own threads - `W:5` : The number of seconds to wait between retries
+ `/COPYALL` : Retain all file/folder permissions and ownership data - `/MT:4` : *_Threaded_* copies that run on their own threads
+ `/E` : Copy every folder, including empty ones - `/COPYALL` : Retain all file/folder permissions and ownership data
- `/E` : Copy every folder, including empty ones
!!! tip "Usage of Administrative Shares" !!! tip "Usage of Administrative Shares"
Whenever dealing with copying data from one server to another, try to leverage "Administrative Shares", sometimes referred to as "Default Shares". These exist in such a way that, if the server exists in a Windows-based domain, you can type something like `\\SERVER\C$` or `\\SERVER\E$` to access files and bypass most file access restrictions (Generally for reading data, writing works too, but not in all circumstances). Whenever dealing with copying data from one server to another, try to leverage "Administrative Shares", sometimes referred to as "Default Shares". These exist in such a way that, if the server exists in a Windows-based domain, you can type something like `\\SERVER\C$` or `\\SERVER\E$` to access files and bypass most file access restrictions (Generally for reading data, writing works too, but not in all circumstances).