robocopy: backup changed files to 3rd directory?

wrybread

Distinguished
Feb 23, 2005
18
0
18,510
I'm trying to set up a backup system where I copy changed files to a zip file or directory outside of the regular backup set.

In other words, if I was backing up c:/docs to d:/docs, and keeping a mirror, normally I'd use:

robocopy c:/docs d:/docs /XO [or /MIR]

And that would replace anything in D that had been changed in C. Great.

But what if I want to save those changed files in C to e:/changed/%date%? I can't see a way to do this with Robocopy.

And in case it isn't obvious, the advantage of using this method is you get redundant backups using much less space. In my experience backups are used more often to recover corrupted files than corrupted harddrives. And the problem with simply mirroring a drive is if the backup runs after the corruption, your backup is now corrupted too. And I know I could keep multiple sets of the whole backup, but that takes mucho space.

So what I'd like to run would be something more like:

robocopy c:/docs d:/docs /XO e:/docs/changed

Anyway, thanks for any help.
 

riser

Illustrious
You could try using XCOPY with the /D (for date) command.

It would allow you to move anything newer than X date to a location. I don't have time to go indepth on looking at what switches and how to make the date variable on a weekly basis to say, but I think you should be able to do it.
 

wrybread

Distinguished
Feb 23, 2005
18
0
18,510
Good idea.

If anyone else is wondering, I found the perfect app: nnBackup. Note the DUMP command, taken from the Linux world, it copies only files newer than the last dump. REally nice program.

Also their nnCron is a great way to schedule events, much better than Windows Task Scheduler. I"ve always hated the way Task Scheduler requires the user running a task to have a password. I understand the security logic, but it's massively inconvenient. I think a better response to the security hole would be to not let network users schedule tasks.

But anyway, nnCRon is great. Another Linux world tool brought to Windows.
 

riser

Illustrious
Robocopy is a Windows SDK file copy program. It allows you to mirror a directory which xcopy won't. It will only copy files over if they've changed from the mirror. It's faster and you get more options with it.

I originally was using xcopy to push files out to location.. but then when I deleted something from the push location, it wouldn't delete from the locations being pushed to. Robocopy allows a mirroring. it mirrors the location out all other locations. Delete something, it will delete it from the other locations.

It's just a more advanced xcopy.. you also have xxcopy which is ok.