• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

robocopy help

dbarton

Senior member
I have a batch file:
robocopy c:\ "v:\changes" /s /xo /purge /maxage:30

This backs up all files that have changed within 30 days, and is used between real backups.
If a file is deleted in the source, it's deleted in the backup.

The problem is that when it runs, if a file is older than 30 days old, robocopy ignores the file if older than 30 days, so it *never* gets deleted from the destination.

Is there a way to get robocopy to do this too, or do I need a separate utility to go thru each destination directory and delete if over 30 days?
 
I have a batch file:
robocopy c:\ "v:\changes" /s /xo /purge /maxage:30

This backs up all files that have changed within 30 days, and is used between real backups.
If a file is deleted in the source, it's deleted in the backup.

The problem is that when it runs, if a file is older than 30 days old, robocopy ignores the file if older than 30 days, so it *never* gets deleted from the destination.

Is there a way to get robocopy to do this too, or do I need a separate utility to go thru each destination directory and delete if over 30 days?

Why only for 30 days? I wold just use the /mir switch for the entire directory, then regardless of how old, if you delete from the source directory, it deletes from the backup. In regard to your OP, I think you want the other way, to ignore the files that are younger than 30 days, so the /minage: switch would be better.

In your test scnenario, you have three files, one 20 days, two 32 days old. You delete the 20 and one of the 32 day old one. A day later you realize you didn't want to delete the 20 day one, it will still be in the mirrored backup, but the 32 day old one will now be missing.

Or you just want it to get rid of any file that is over 30 days or period and only if it had changed within 30 days?, regardless of if it is in your source?
Plus if you do "c:" it will end up coping tons of crap that you don't really want, things like your surfing IE temp files, temp docs, etc. I would limit it to specific folders so you know what you are backing up.
 
Back
Top