Solved

robocopy script for differential backup.

Posted on 2007-03-28
6
10,948 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having issues meeting security compliance criteria because of those pesky USB drives? Then I can help you! This article will explain how to disable USB Mass Storage devices in Windows Server 2008 R2.
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
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…

730 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