How to restart automatically the server after the backup is done

backupwbadmin

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 ?

Best Answer

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.

http://technet.microsoft.com/en-us/library/cc734345%28v=ws.10%29.aspx

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

Simply right clicking the event log entry and choosing "Attach task to event" should get you there. http://technet.microsoft.com/en-us/library/cc748900.aspx