We help IT Professionals succeed at work.
Get Started

Robocopy to copy only Changed / New Files ?

11,016 Views
Last Modified: 2012-05-09
Hello Gurus,
here is my situation.

I have around 300Gb of Data on my Server that I need to backup and keep daily copies for a 7 days (Company's Policy).

Normally , I would need a 300GB *10 space but since we all know that no way that all data changes every day... So I was thinking of having the following scheme...

Robocopy ALL Files on a Folder called ALL
and create folders Mon/Tue/Wed...etc and do an incremental backup of the CHANGED / NEW Files only to those folders...

I created the following  batch file :

*********************************************************************
C:
CD \
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET day=%%A
MD C:\Daily\%day%
ROBOCOPY \\DATA-SRV\D$  R:\Daily\%day% /TEE /E /R:5 /W:15 /FFT /NP
*********************************************************************

My problem with this script is that Mon will contain all files.
Tue also ...Wed also....

What I want is the following.

Once a month I create the ALL folder that is :
ROBOCOPY \\DATA-SRV\D$  R:\ALL /TEE /E /R:500 /W:500 /FFT /NP

and then every day the robocopy command should check what are the files changed/added between the
<ALL> folder AND the <DATA-SRV\D$> to be copied to the Folder Mon/Tue/... according to the date...
in that case I would have the full backup in the ALL folder...and any changes in the Mon/Tue/Wed...folder...


Can this be done ?

Thanks Gurus

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 21 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE