Solved

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

Posted on 2013-01-23
3
1,386 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
3 Comments
 
LVL 12

Expert Comment

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

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
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
Comment Utility
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
OfficeMate Freezes on login or does not load after login credentials are input.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now