Welcome to OWSUG.ca Sign in | Join | Help
How to run a pre- and post-backup scripts with Microsoft System Center Data Protection Manager (DPM) 2007

 

Today someone asked me does DPM can run a pre and Post backup jobs , my answer  was NO because it is not straight forward from the GUI , but you can edit the ScriptingConfig.xml located in the protected server at install path\Microsoft Data Protection Manager\DPM\Scripting

 

When DPM runs a protection job, ScriptingConfig.xml on the protected computer is checked. If a pre-backup script is specified, DPM runs the script and then completes the job. If a post-backup script is specified, DPM completes the job and then runs the script.

when I Say Protection Job that include “replica creation, express full backup, synchronization, and consistency check.”

This is the raw file in the Protected Server:

<?xml version="1.0" encoding="utf-8"?> <ScriptConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2003/dls/ScriptingConfig.xsd">   

<DatasourceScriptConfig DataSourceName="Data source">    

<PreBackupScript>”Path\Script Parameters”  </PreBackupScript>    

<PostBackupScript>"Path\Script Parameters” </PostBackupScript>     

<TimeOut>30</TimeOut>   

</DatasourceScriptConfig>

</ScriptConfiguration>

in this example I am deleting  some files using the  “PreBackup.cmd" batch file prior to the backup job

protection the F: drive.


example :

<?xml version="1.0" encoding="utf-8"?>
<ScriptConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns="http://schemas.microsoft.com/2003/dls/ScriptingConfig.xsd">

  <DatasourceScriptConfig DataSourceName="F:"> 
       <PreBackupScript>
           "F:\PreBackup.cmd"
       </PreBackupScript>
<PreBackupCommandLine />

<PostBackupScript/>

  <TimeOut>90</TimeOut>
  </DatasourceScriptConfig>
</ScriptConfiguration>

 

For each data source, complete the DatasourceScriptConfig element as follows:

  1. For the DataSourceName attribute, enter the data source volume (for file data sources) or name (for all other data sources). The data source name for application data should be in the form of Instance\Database for SQL, Storage group name for Exchange, Logical Path\Component Name for Virtual Server, and SharePoint Farm\SQL Server Name\SQL Instance Name\SharePoint Config DB for Windows SharePoint Services.
  2. In the PreBackupScript tag, enter the path and script name.
  3. In the PreBackupCommandLine tag, enter command-line parameters to be passed to the scripts, separated by spaces.
  4. In the PostBackupScript tag, enter the path and script name.
  5. In the PostBackupCommandLine tag, enter command-line parameters to be passed to the scripts, separated by spaces.
  6. In the TimeOut tag, enter the amount of time in minutes that DPM should wait after invoking a script before timing out and marking the script as failed.

Note:

The backup job will not happen and will generates the following error in the following cases :

The configuration of the pre-backup script or the post-backup script XML for Volume F:\ is incorrect. (ID 30193 Details: Internal error code: 0x809909F4).

The execution of the pre-backup script for Volume F:\ returned an error. (ID 30189 Details: Internal error code: 0x809909F0) .

“now chubby will be happy again”

Thanks

 

ISlam @ IslamGomaa.com

Published Tuesday, March 30, 2010 11:18 PM by islam

Comments

Anonymous comments are disabled
Powered by Community Server, by Telligent Systems