Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to restart my server once the backup job is done.

I launch the backup job at the commande line using

wbadmin start backup [options]

This command only starts backup and exits. Therefore it is not possible to use something like this, because the server would restart immediately:

wbadmin start backup [options]
shutdown -r

Is there a solution to execute the backup and the restart with the same scheduled task, or do I simply have to schedule two tasks at a reasonable interval ?

share|improve this question
up vote 6 down vote accepted

I would presume that you could schedule a task based on the Event ID 4 in the event logs to kick off a reboot after it is posted.

Product:    Windows Operating System
ID:     4
Source:     Microsoft-Windows-Backup
Version:    6.0
Message:    Backup finished successfully.

Simply right clicking the event log entry and choosing "Attach task to event" should get you there.

share|improve this answer
This is a great answer. I learnt about attaching a task to an event, which will come in handy many times. – Lorenz Meyer Mar 7 '14 at 20:13
You might want EventID 19 as well. 19 is a backup failed to start.. This would reboot even if the backup failed. Assuming you want it to do that.. I use it for emailing me a notification of backup failure as you don't get an EventID 4 when it fails... – MikeAWood Mar 7 '14 at 21:13
Yeah, all the events associated with Windows Backup can be found here: - so feel free to queue off of whatever is showing up in your logs as best as you see fit. – TheCleaner Mar 7 '14 at 22:12

You can use the get status argument to wbadmin. It won't return until the job completes, so it would be fairly trivial to write a script that kicked-off the backup, fired off a wbadmin get status, and then did whatever you want after the backup completes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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