Using Pre-Backup and Post-Backup Scripts in DPM
You can configure DPM to run scripts before (pre) and after (post) each DPM backup job. This can used to prepare the data source for backup and also to start a service again after backup.Â
On each agent machine, in the DPM folder under \DPM\Scripting there is a file named ScriptingConfig.xml. This is the file that you use to configure pre-backup scripts and post-backup scripts. These scripts are run with the local system account. The script needs to be configured on each agent, or you could use some find of deployment system to deploy the configuration file to multiple machines.
In my test I simply stopped the print spooler (spooler) service and started it again after backup. I created two CMD files in C:\Scripts. The files include “net start spooler†and “net stop spoolerâ€. My test machine ScriptConfig.xml looks like this (click to view the full image):
The BackupCommandLine lines is for command-line parameters to be passed to the script. The DataSourceName attribute is the data source volume or name, for example a storage group name in Exchange.
I have not found a good way to see if the pre-backup and post-backup script ran successfully. But if you have Operations Manager in your environment, you can configure your scripts to echo to event viewer. Then you can use the missing event monitor to make sure the scripts are run successfully every X minute, for example if you do a backup every hour, then you want an event every hour too.
Remember to include your scripts in your disaster recovery plan.
Â
Files created last X hours including Y in the filename
This is a script that checks if there is a new file, contains a keyword, and that the file has been created last X hours. For example if you have a couple of servers uploading files every hours, you can check with this script if all servers have uploaded a new file the last hour. Even if the filename is not always the same, for example many applications add a timestamp to the filename like server05_20081012.
Configuration.txt contains all keywords that should be included in a filename. Contoso_filecheck.hta is a GUI that you can use to add keyword, delete keywords and show current keywords. contoso_filechecker.vbs is the script that does the filecheck.
- The script counts number of files in the folder, that was created last X hours (default folder is C:\LogFiles and default time is 24 hours)
- The script creates an array of all the files that was created last X hours
- The script loops all selected files and checks if the keyword is in the filename. It then moves on to the next keyword and loops all selected filenames.
- If the keyword, for example a server1, is in Configuration.txt but there is no file including server1 created last 24 hours, a local event will be created including the time configuration and the keyword.
- You can configure MOM 2005 or Ops Mgr to pickup these events and generate an alert.
Download the script here.
Microsoft Hyper-V Server and System Center
I installed a Microsoft Hyper-V Server a couple of days ago. Hyper-V Server is a version of Windows Server 2008 core that includes the Hyper-V role, all other roles are disabled. There is a new simple interface to configure the server. You can also use the Hyper-V MMC and System Center Virtual Machine Manager to administer your Hyper-V server. More info about Hyper-V Server here.
I installed an agent from Operations Manager 2007 without any problem. However I found out that Ops Mgr found the machine as 2008 full installation (installation type = full), not as a core machine (installation type = core). Not the worst thing, but it is good to know. You can see it if you create a new state view target Windows Server 2008 Computers.
I also tried to install a Data Protection Manager 2007 agent on my Hyper-V server. First DPM could not identify my Hyper-V server as a known Windows version. In Active Directory I could see that my Hyper-V server operating system is set to “Hyper-V Server”, not “Windows Server 2008 Enterprise” as my other core machines. When I changed it to “Windows Server 2008” there was no problem adding it to DPM and installing the agent. I guess that the DPM query does not recognize “Hyper-V Server” as a supported operating system, but that works too after this “workaround”.
Generate SCSM Incident with Opalis
Recent Comments