Posted by: Ian | July 15, 2009

Windows 7 backup and how to automate it

I’ve been using Windows 7 since early beta and have to say it is awesome.  Then again I had no real issues with Vista.  Most of the complaints about Vista aren’t going to go away with Windows 7, but it does fix a number of things.

Anyway getting slightly off topic, I wanted to talk about Windows 7 backup and restore and specifically something you don’t see other people talking about.  Since Windows 7 backup now allows saving to network shares and allowing specific folder backup rather than the whole machine there is quite a bit of flexibility. 

However what if your machine isn’t on when you set your backup schedule?  I certainly don’t want it to run when I’m actually using the machine so set about automating the backup process.

I wanted the machine to turn on at a specific time, kick off the backup then go back into sleep hybrid mode (Not hibernate).  Easy you may think but not using the built in Backup gui.

To achieve this I had to look in the task scheduler and make some alterations to the backup schedule.  So here’s what you do.

  • Create a backup schedule using the normal Windows 7 backup and restore wizard
  • Next fire up task scheduler
  • Find the backup task which has been newly created.  It’s under Microsoft –> Windows –> Windows Backup

image

  • Right click it and edit the properties
  • Click the conditions tab and select “Wake the computer to run this task”
  • Hit OK

That’s it!  Well not quite, now we have to set up the sleep portion after the backup.  Unfortunately I couldn’t find a suitable way to do it with the in built functions of Windows 7, so I downloaded psshutdown from here – http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx

Once downloaded extract psshutdown to c:\windows (Or anywhere else you like).

Now we just add another action in to the scheduled task.  So go back in to the scheduled task in task scheduler and edit it again:

  • Click the actions tab
  • Click new
  • Setup the following

image

  • Click OK once done.
  • It should now appear in the action list, click OK again

Sweet!  Now after the backup has run it will run the psshutdown command with the –d (Sleep) with a 30 second delay (You can change this).  There are a bunch of other switches you can use but I’m not going to list them.

Now we’re done.  Hopefully this was helpful.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Categories

%d bloggers like this: