Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

robocopy script for differential backup.

Posted on 2007-03-28
6
Medium Priority
?
10,976 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 2000 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
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…

670 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