Scripting Question

Is there a way to write a script that runs robocopy conditionally and backs up only what is needed to be backed up at the destination path? (keep reading, this question is too long.)

10/06/2015 950 views
Is there a way to write a script that runs robocopy conditionally and backs up only what is needed to be backed up at the destination path? To further elaborate - 

Is there a way to script a backup in such a way that the script can sniff out the destination location; and if the destination is up to date, it can skip that backup or backup object? In other words, for backup items that are potentially larger, can a script be made that only backs up exactly what’s needed, no more? i have the need for automated backups, i'm wanting to make machines backup to a network location upon, logoff, reboot, shutdown and logout. but if there is a ton of data, and the backup destination is already up to date; i do not want to create my own monster by redundant, time consuming, large backups every time a computer initiates a shutdown, log off, etc. i only want it to backup what is needed. I'm using a .bat file with robocopy. wanting to eventually make this a GPO once i get the kinks ironed out. 

0 Comments   [ + ] Show comments


Community Chosen Answer

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


Answered 10/06/2015 by: SMal.tmcc
Red Belt

  • Nice! thanks!
    • if that switch does it please mark it as answered

All Answers

A scripted solution is too flaky, in my view. Do you want to tell your MD that, unfortunately, the backup script didn't run and the update he spent hours on yesterday is toast? You should be hosting your users' profiles to a backed-up network share.
Answered 10/07/2015 by: VBScab
Red Belt

  • I definitely thought about doing that, but have no experience in moving entire profiles to a network location. would you put this on your NAS? How did you go about doing that? if you have info about that i'd be glad to look it over. Could be the go-to solution for me after all.
>How did you go about doing that?
The network was set up that way from scratch. The process of migrating local profiles to network-located ones depends very much on how many users we're talking about. If it's under 100, it could be done, say, 5 at a time, probably manually. If it's 5,000...well, that becomes a project!
Answered 10/07/2015 by: VBScab
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ