1

My question is regarding re-running backup jobs only for those databases for which the job initially when it ran failed due to some reasons, like server reboot, path not accessible, newly created databases, etc. In our environment, windows patching happens every month. Due to server reboot at this time, backup job fails. Also, sometimes if user creates a new database then a scheduled differential backup job fails. Is there any way to run the same job but for only those databases which were not backed up earlier?

Please provide your suggestions

  • Are the monthly reboots at a known time? If so, why not just suspend the job until the system comes back up, re-enable it, run it and move on? – Kris Gruttemeyer Jan 20 '15 at 21:55
  • Sometimes, unexpected reboots happen due urgent server maintenance or for testing purpose. we can't overcome this how carefully we plan. Hence my question. – Abhinav Singh Jan 20 '15 at 21:58
2

While it depends on how many jobs and your backup methods, one of the simplest options is to have the job use retry attempts and intervals to re-run the job.

You can set the intervals at a high amount to account for a full system reboot and use these jobs specifically during reboot windows. Just go to Job Properties -> Steps -> Advanced

enter image description here

(Job pictured is from Ola Hallengren's scripts which contain great backup jobs)

Include a cleanup step first to remove any backups from recent history (say, 1 hour) that may no longer be valid/desirable and then perform a complete backup. I think this is preferable as it gives you a set of backups all from the same time frame and not staggered depending on when the shutdown occurred.

Really though, you should be able to reliably control and schedule your reboots and thus schedule key backup jobs around that time frame. We all update our boxes (I hope) and work around a set schedule for reboots so as to not have this issue. Stronger change control management might be the true solution if this server is important enough to stay on top of backups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.