robocopy setup help

i have a drive G: that is a network drive and woudl like to robocopy everything from G: to e:\ full on monday and incremental tuesday thorugh thursday. I have robocopy already I was going to try something like this will this work please help thank you

robocopy g:\ e:\sbas /mir /xd
zenworksbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
qz8dswCommented:
/xd doesn't look right at all.
"/XD dirs [dirs]... : eXclude Directories matching given names/paths."

Perhaps you meant /XO
"/XO : eXclude Older - if destination file exists and is the same date or newer than the source - don't bother to overwrite it."

For your incrementals /XO should get the job done.
For your full, /mir should work a treat.

Please note however you are not copying over the security, owner or auditing information (Because of not speficying the /copy option).
"/COPY:copyflag[s] : What to COPY (default is /COPY:DAT).
(copyflags : D=Data, A=Attributes, T=Timestamps).
(S=Security=NTFS ACLs, O=Owner info, U=aUditing info)."

You might also need /IA:RASHCNETO to be sure you pick up ALL files (Promarily the system and hidden ones)

http://www.ss64.com/nt/robocopy.html

Terry
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
by default, robocopy does incremental...

to make a full copy, you either use the /IS flag, or don't use robocopy at all..

http://www.ss64.com/nt/robocopy.html
0
 
qz8dswCommented:
Actually Angel Robocopy will not by default do an incremental. (Copy newer files from source to the destination)
It just copies ALL files with different timestamps or sizes.
BUT the senario you update one on the destination (for later migration) would be over-written without specifying /XO
Also good catch on the /IS, Knew I was missing something on the full command line.

Terry
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>It just copies ALL files with different timestamps or sizes.
that is, for me, an incremental. anything that changed / is different gets copied...
maybe you can enlighten me on the difference?

0
 
qz8dswCommented:
Hi Angel,
Sometimes I think in a "prod/development/DR" mindset abit too much.

I'm used to things like Arcserve/Brightstore, medium/enterprise backup packages backing up to offline media, but also do abit of this with source control on disk (Hence my pointing out about the destination being modified).
Incrementals (In my mind) should only backup files from the source that have changed since the last full backup.
Whats on the target is not relevant at all. It's just if it's changed on the source since the last full backup.

Then theres differential backups, which is backing up everything thats changed on the source since the last backup (NOT full backup). So restoring them can be a pain because you have to restore your full and every differential since the full. At least with the incrementals you only have to restore the last incremental.

The archive attribute for files/directories is used alot for identifying such files.

I might be going abit too far with what I'm saying about /XO, was just thinking about it alone the lines of how I'd do it with what I understand an incremental backup to be which is totally source computer based.

Terry.
0
 
qz8dswCommented:
BUT also thinking about them modifying the destination files (A development enviroment) and what would happen to their modified files.
0
 
zenworksbAuthor Commented:
so if I setup a batch file to run this every monday as my full

robocopy g:\ e:\sbas /mir /xd

and this tuesday thorugh thursday as the incremental

robocopy g:\ e:\sbas /mir

thsi shoudl work?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes, at least that is what I would think of the parameters...
0
 
zenworksbAuthor Commented:
quick question someone deleted or i deleted the robocopy :) where can I download it
0
 
qz8dswCommented:
http://go.microsoft.com/fwlink/?LinkId=4544
It's the windows 2003 resource kit with an updated robocopy.

And for your command line the /XD is for expluding directories but your not specifying any to exclude.

For your weekly
robocopy g:\ e:\sbas /mir /IA:RASHCNETO

For your incremental
robocopy g:\ e:\sbas /IA:RASHCNETO
or
robocopy g:\ e:\sbas /XD /IA:RASHCNETO
Depending on wether or not you want the source to overwrite any files changed on the target.

Terry
0
 
zenworksbAuthor Commented:
what I would like is for there to be a directory called sbas for the full
then a incrmental location for tuesday -friday with four different folder tuesday wednesday thursday friday. i only want chagned files in teh tuesday through friday
0
 
qz8dswCommented:
Robocopy is not really built for doing that on the fly.
Robocopy is good for backup and archive, BUT it needs to know what files are on the destination as a comparision.
Sounds like you'll have to make use of the archive attribute on files.
The /mir switch is what you want for the full, BUT doing a /mir does not reset the archive bit for the file. (So you can see the files changed for your incremental backups)

Just in case you didn't know, the archive attribute is set on a file when it's modified in any way.
It's an easy way for software to know if files have changed since the last backup.

Robocopy has no way I know of to reset the archive bit on all file after the full backup, so 2 ways to go.
1) add a command in the batch file after robocopy that does a
attrib -a g:\ /s /d
That command removes the archive attribute on all files and directories. (But does increase the time it would take for a full backup)
Then for your incrementals
robocopy g:\ e:\Monday /M /IA:RASHCNETO
or
robocopy g:\ e:\Monday /A /IA:RASHCNETO
A batch file could easily be created that got the day of the week as a variable so you didn't need to create one command for each incremental.

The difference between /M and /A?
/M resets the archive bit on files, So that means in the monday directory you only have files that were modified since the last FULL backup (Lets say Sunday)  Tuesdays directory backs up all files changed since Mondays backup, etc....

/A DOES NOT reset the archive bit on files, So that means in the monday directory you only have files that were modified since the last FULL backup (Lets say Sunday)  Tuesdays directory backs up all files changed since the last full backup, etc....

2) Use XXcopy or windows backup (Or a more robust backup solution).
XXCopy is VERY much in the same vain as Robocopy, but with a few subtle differences. (Notibly being able to reset the sources archive bit when using /clone(It's version of robocopies /mir) )
http://www.xxcopy.com/xxcopy30.htm
Windows Backup is more suited to doing the whole full,incremental scheme (And probably faster)

Terry
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.