If you are conscious about the safety of your data, then it is a good habit of taking backup of important data. But if there is large amount of data which has to be transfer from one place to another for backup purpose, then copy and paste or drag and drop is a boring and time consuming operation. In this situation you need a very fast, error free and customizable copy process.
Fortunately, Robocopy will allow you to create a powerful data backup operation. Robocopy (Robust File Copy) is a command-line file copy utility that comes with Windows Vista / Windows 2008 or newer. Unlike normal copy commands, Robocopy is designed for reliable copy or mirroring while maintaining the permissions, attributes, owner information, timestamps and properties of the objects copied.
Robocopy is a powerful tool, capable of moving, copying, and deleting files and folders faster than you can’t imagine. Let’s have a look on its features –
- Ability to tolerate network interruptions and resume copying
- Ability to skip files that already appear in the destination folder with identical size and timestamp.
- A continuously updated command-line progress indicator.
- Ability to copy file and folder names exceeding 254 characters — up to a theoretical limit of 32,000 characters — without errors.
- Multithreaded copying. (Windows 7 and Windows Server 2008 R2)
- Return code on program termination for batch file usage.
Multi-threaded support allows Robocopy to open multiple threads simultaneously, allowing many files to be copied in parallel. With multi-threaded copying, total time required to complete the operation will be drastically reduced and cut, when comparing with typical copying one file at time in serial sequential order.
ROBOCOPY <source> <Space> <destination> [file…] [options]
<source> - Source Directory (local or network path)
<destination> - Destination Directory (local or network path) and
[file…] Specifies the file or files to be copied. You can use wildcard characters (* or ?), if you want. If the File parameter is not specified, *.* is used as the default value.
Examples of Robocopy’s Syntax:
To copy contents from C:\Source to C:\Destination -
Robocopy C:\ Source C:\ Destination
To copy all contents including empty directories of SourceFolder to DestinationFolder:
Robocopy C:\SourceDir C:\DestDir /E
How to Take Backup using Robocopy:
The easiest way to use the ROBOCOPY command to create a backup is by creating a batch (.BAT) file. A batch file is a simple text file, that when executed, runs several commands one after the other.
- Open a Notepad File
- Copy following code into Notepad
Robocopy C:\Users\dbm28\Desktop\source C:\Users\dbm28\Desktop\destination /E /MIR /W:0 /R:1 /Z >> D:\externalbackup.log
- Save this file as Backup.bat
- Double click on it to run for backup
/E = copy all sub-folders, even empty ones
/MIR = Mirror (check the files in the destination, and only copy newer files) (Note that this will delete files at the destination if they were deleted at the source.)
/W:0 = Wait time between retries, the default is 30 seconds. If a file is locked, because it is in use, the robocopy can wait and retry.
/R:1 = The number of retries, if the file is locked
/Z = ensures Robocopy can resume the transfer of a large file in mid-file instead of restarting
>> D:\externalbackup.log = create a logfile in D drive
(Note: See the additional parameters below this post)
Set up the scheduling of the backup:
You can automate your backup's by using the Windows 7 Task Scheduler to run the .BAT file at specific times.
In the Start menu Search box type “Task Sheduler” or by opening All Programs - Accessories - System Tools.
From Action Menu – select ‘Create Basic Task'. Now Create Basic Task Wizard will open
Here type a 'Name' and 'Description' for your new task and click Next
Select when you want the task to start and click Next.
Select the Date and Time at which you want the first task to start and the give Recurring day, then click Next.
Choose the action you want the task to perform from the list then click Next
Click 'Browse' and find your Backup.bat file then click Next.
In a Summery make sure that everything is correct and then click Finish.
That’s it. Now You have a high performance backup with free of cost!
GUI for Robocopy:
If you want a simple GUT (Graphical User Interfaces) for Robocopy, then download these tools and configure them in very easy steps.
If you don't want to work directly with the console or are overwhelmed by Robocopy's flexibility
RoboMirror make Robocopy more accessible by providing a very simple and user-centered GUI, because most users simply don't want to work directly with the console or are overwhelmed by Robocopy's flexibility.
Download: Robomirror (http://sourceforge.net/projects/robomirror/?source=typ_redirect)
2) RoboCop RoboCopy:
RoboCop RoboCopy is a GUI skin and script generator for Robocopy.exe. It has ability to monitor the progress of the robocopy job in real time, current speed, completion time etc.
Download: RoboCop RoboCopy (http://sourceforge.net/projects/robocoprobocopy/?source=typ_redirect)
There are many parameters you can set in Robocopy -
/S : Copy Subfolders.
/E : Copy Subfolders, including Empty Subfolders.
/COPY:copyflag[s] : What to COPY (default is /COPY:DAT)
(copyflags : D=Data, A=Attributes, T=Timestamps, S=Security=NTFS ACLs, O=Owner info, U=auditing info).
/DCOPY:T : Copy Directory Timestamps.
/MAXAGE:n : Maximum file AGE - exclude files older than n days/date.
/MINAGE:n : Minimum file AGE - exclude files newer than n days/date.
(If n < 1900 then n = no of days, else n = YYYYMMDD date).
/L : List only - don’t copy, timestamp or delete any files.
/MOV : MOVe files (delete from source after copying).
/MOVE : Move files and dirs (delete from source after copying).
/Z : Copy files in restartable mode (survive network glitch).
/B : Copy files in Backup mode.
/ZB : Use restartable mode; if access denied use Backup mode.
/IPG:n : Inter-Packet Gap (ms), to free bandwidth on slow lines.
/CREATE : CREATE directory tree structure + zero-length files only.
/PURGE : Delete dest files/folders that no longer exist in source.
/MIR : Mirror a directory tree - equivalent to /PURGE plus all subfolders (/E)
/XO : exclude Older - if destination file exists and is the same date or newer than the source - don’t bother to overwrite it.
/MAX:n : Maximum file size - exclude files bigger than n bytes.
/MIN:n : Minimum file size - exclude files smaller than n bytes.
/MAXLAD:n : Maximum Last Access Date - exclude files unused since n.
/MINLAD:n : Minimum Last Access Date - exclude files used since n. (If n < 1900 then n = n days, else n = YYYYMMDD date).