?
Solved

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

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.
Suggested Courses

770 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