Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-01-23
3
Medium Priority
?
1,454 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 2000 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

650 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