How to use ScriptingConfig.xml in DPM

ernst te brake 1 Reputation point
2023-12-20T13:46:58.8333333+00:00

Hello,

I try to find out how to get Pre-backup and Post-backup scripts for DPM to work in my enviroment.

I have a hyper-v cluster of 3 servers, where on each server about 10 vms are running. For the vm who is running oracle i want run a pre backup script so the oracle database is clossed before i make a backup. I have a protection group with only that oracle vm in it and want to fire scriptingconfig.xml when that protection group runs.

I made a test.bat script that only echo the current date and time to a txt-file and placed it at a test dir on the vm, but when i do a perform a consistency check it failes with the message "The configuration of the pre-backup script or the post-backup script XML for volume c:\ is incorrect. (ID 30193: Details internal error code: 0x809909F4)". But i do not know what the xml error is.

The scriptingconfig.xml looks like this:

<?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="C:">
		<PreBackupScript>c:\test\test-begin.bat </PreBackupScript>
		<PostBackupScript>c:\test\test-eind.bat </PostBackupScript>
		<TimeOut>30<\TimeOut>
	</DatasourceScriptConfig>
</ScriptConfiguration>

the batch file looks like this:

set now=%date:~-4%%date:~7,2%%date:~4,2%-%time%

echo begin gelukt %now% >>c:\test\test.log

Hope someone can help me with what i do wrong.

Microsoft System Center Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. XinGuo-MSFT 22,231 Reputation points
    2023-12-21T08:45:01.61+00:00

    Hi,

    The error code 0x809909F4 is an internal error code that indicates that the XML file may have errors or may not be well-formed.

    To resolve this issue, you can check the ScriptingConfig.xml file in the \Microsoft Data Protection Manager\DPM\Scripting folder on the protected computer. Make sure that the XML file does not have any errors and that it is well-formed.

    <?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>
    

    The following example for your reference:

    https://techcommunity.microsoft.com/t5/system-center-blog/how-to-use-a-pre-backup-or-post-backup-script-to-reset-the/ba-p/342194

    I hope this helps!


  2. Amardeep Saini 1,735 Reputation points Microsoft Employee
    2023-12-22T11:59:53.83+00:00

    Hello @ernst te brake , Thank you for contacting us on Microsoft Q&A platform. Happy to help!

    You want to use Pre-backup and Post-backup scripts for DPM for Hyper-V VM so you need to make below mentioned changes in the XML File.

    Currently Line in the XML File:

    <DatasourceScriptConfig DataSourceName="C:">

    Modified Line in the XML File:

    <DatasourceScriptConfig DataSourceName="VM ID">

    You can get the VM ID from Hyper-V host by running below mentioned command.

    get-vm -name VMNAME |select-object name,ID

    If the suggestions were helpful, click “Accept Answer” and Up-Vote. Feel free to reach out to us if you've additional questions in this regard.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.