Solved

How to Script a Daily Windows Server 2008 Command-Line System State Backup

Posted on 2013-01-23
3
1,431 Views
Last Modified: 2013-02-08
My Windows Server 2008 Domain Controller has a 20GB C:\, and I have added a second 20GB D:\ drive for Daily System State backups (ONLY!).

Brief Story: After having witnessed a disaster at another company using 3rd party backup tools, I now know that a Veeam/vRanger/BackupExec backup will not backup Active Directory on a Windows 2008 correctly, so I want to script a daily System State backup using the Windows Server 2008 Backup feature. The GUI forces you to backup the whole server, when I only want the System State part.

The following command will run a System State backup to the server's D: drive:

 
WBADMIN START SYSTEMSTATEBACKUP -backuptarget:D:

Open in new window


BUT I want a script that does the following:

1. Script kicks off every day at 13:00
2. Checks for existing System State backups, if any exist, then delete
3. After existing backup is deleted, the a new System State backup should begin
4. On completion, a simple "System State backup was completed on" %Date%, %Time%" is appended to a text/log file e.g. D:\SysStateBkp.log

Has anyone completed a similar task before, or have any ideas?

Thanks,
Fin
0
Comment
Question by:cpadm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:Seaton007
ID: 38811220
You should be able to do this with Task Scheduler.
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38811877
Checkout this script from Script Center and see if it works for you, As mentioned above you can schedule this script daily to run at 13:00..

Folders and System State Backup using PowerShell script
http://gallery.technet.microsoft.com/scriptcenter/Folders-and-System-State-e60faab7
0
 
LVL 1

Author Closing Comment

by:cpadm
ID: 38868317
That weblink was very helpful in assisting us write a custom Powershell script to automate the creation of Windows DC system state backups.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question