Solved

robocopy script for differential backup.

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
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…

615 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