Solved

robocopy script for differential backup.

Posted on 2007-03-28
6
10,895 Views
Last Modified: 2012-05-05
Hi ,
we are running robocopy script for backing up data from one server to other server.
It looks like it is doing full backup at scheduled time and it is taking very long time and not getting finished till work hours in morning.
The robocopy script is
robocopy "\\server1\share" \\server2\share /E /MIR /Z /R:5 /W:10 /NP /LOG:d:\robocopy\share_backup.log
Can anyone suggest what option should we use in script so that it runs differential backup rather than full backup every night.
Thanks in advance.
Krish
0
Comment
Question by:incapital
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
Nick Denny earned 500 total points
ID: 18810191
Quote from http://www.ss64.com/nt/robocopy.html


:: The script below copies data from FileServ1 to FileServ2, the destination holds a full mirror (all files), when run regularly to synchronize the source and destination, robocopy will only copy those files that have changed (changed meaning different time stamp or different size.)

@ECHO OFF
SETLOCAL

SET _source=\\FileServ1\e$\users

SET _dest=\\FileServ2\e$\BackupUsers

SET _what=/COPYALL /B /SEC /MIR
:: /COPYALL :: COPY ALL file info
:: /B :: copy files in Backup mode.
:: /SEC :: copy files with SECurity
:: /MIR :: MIRror a directory tree

SET _options=/R:0 /W:0 /LOG:MyLogfile.txt /NFL /NDL
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries
:: /LOG :: Output log file
:: /NFL :: No file logging
:: /NDL :: No dir logging

ROBOCOPY %_source% %_dest% %_what% %_options%

If either the source or desination are a "quoted long foldername" do not include a trailing backslash.
0
 
LVL 13

Expert Comment

by:Nick Denny
ID: 19212291
I am interested in its final disposition and believe I gave the solution.
0
 

Expert Comment

by:sibliege
ID: 34143999
The script is long because of these arguments: /R:5 /W:10

This mean that for every file in use, the script wait 10 sec before retrying 5 time!
If you have 200 file in use this mean that the script wait this time
200x5timex10sec => 10.000 sec meaning nearly 3 hours!

You should decrease this value, I suggest use 0 because when a file is open, is open till the next day ;)
/R:0 /W:0
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

If you have a USB Drive that is not recognized by Windows the problem is usually that you have too many network drives or other drives that occupy all the drive letters D: E: or F: which is the normal drive letter of a usb drive. The way to correct …
We wanted to provide an in-depth explanation of the Ping Node offering clarifications on its function and usage. Incorrect Ping Node configuration and functionality can cause problems with HA clusters. The importance of this article is critical for …
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now