Solved

robocopy script for differential backup.

Posted on 2007-03-28
6
10,930 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
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 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…

777 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