none
DPM 2012 SP1 Error Pre-/ Post-BackupScript RRS feed

  • Question

  • I am trying to stop some services before backup (e.g. mySQL).
    The command to do this works OK, but when I configure it in the DPM 2012 SP1 PreBackupScript DPM records an error and nothing is shown in the local event log.

    So here ist the script-config:

    <?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:\DPMAgentScript\PreBackup.cmd" </PreBackupScript>
         <PostBackupScript>"C:\DPMAgentScript\PostBackup.cmd" </PostBackupScript>
         <TimeOut>30</TimeOut>
       </DatasourceScriptConfig>
    </ScriptConfiguration>

    here is the command:

    @echo off
    echo PreBackup %DATE% %TIME% > C:\DDPMAgentScript\PreBackup.log
    net stop "PrimeOPC"
    net stop "MySQL"

    and here is the error shown in the DPM console:

    Fehler beim Ausführen des Skripts vor der Sicherung für Volume C:\. (ID 30189 Details: Interner Fehlercode: 0x809909F0)

    No matter what I try, the command never gets executed, and it's hard to debug because 0x809909F0 is not documented, there is nothing in the local eventlog and 30189  just says that there is something wrong with the script....

    Any help/tip would be very much appreciated.

    Bets regards

    Thomas

    Tuesday, August 6, 2013 12:53 PM

Answers

  • Hi,

    Ok - I could not duplicate your error using the above xml, but the DatasourceName needs the trailing \ for DPM to run the script.

       <DatasourceScriptConfig DataSourceName="C:\">

    To troubleshoot this further on your end preform the following to enable verbose logging.

    1) On the protected server, run regedit and ADD the following value:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager
    TraceLogLevel:REG_DWORD:0x43e

    2) Stop DPMRA service on the protected server.
         net stop dpmra

    3) On the DPM Server, initiate a sync or recovery point for that datasource.

    4) After it completes (or fails) on the protected server open the C:\Program Files\Microsoft Data Protection Manager\DPM\Temp\DPMRACurr.errlog in notepad and search for the following string

        CCreateSnapshotSubTask::ExecutePreScript

    That will be the start of looking to see if the xml has information about running the pre and post scripts - there should be details about why it is failing.

    When done, delete or rename the TraceLogLevel registry value and restart DPMRA to turn off verbose logging.  


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by ThomasJF Thursday, August 8, 2013 1:16 PM
    Wednesday, August 7, 2013 5:07 PM
    Moderator

All replies

  • Hi,

    ErrorCode: 0x809909F0 (-2137454096): RA_PRESCRIPT_E_FAILURE:  Prescript execution failed which is done during prebackup phase.

    I believe our documentation may be wrong.  Please remove the " " around the paths for the script to execute as follows.

    <?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:\DPMAgentScript\PreBackup.cmd </PreBackupScript>
         <PostBackupScript>C:\DPMAgentScript\PostBackup.cmd </PostBackupScript>
         <TimeOut>30</TimeOut>
       </DatasourceScriptConfig>
    </ScriptConfiguration>


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, August 6, 2013 4:31 PM
    Moderator
  • Hmmm... I tried that again.... in fact I tried with and without ", and also C: and C:\ and C with and without ". No change at all. still stupid

    Betroffener Bereich: C:\
    Besteht seit: 07.08.2013 12:12:02
    Beschreibung: Seit Mittwoch, 7. August 2013 12:12:02 sind Synchronisierungsaufträge für C:\ auf PR02.local.schuetzengarten.ch gescheitert. Gesamtanzahl gescheiterter Aufträge = 1. Der letzte Auftrag ist aus dem folgenden Grund gescheitert: (ID 3115)
    Fehler beim Ausführen des Skripts vor der Sicherung für Volume C:\. (ID 30189 Details: Interner Fehlercode: 0x809909F0)

    Even if I copy a sample from the MS Docu Page, the result ist the same....

    Wednesday, August 7, 2013 10:25 AM
  • Hi,

    Let me test it myself and see if I can duplicate the issue.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, August 7, 2013 1:06 PM
    Moderator
  • Hi,

    Ok - I could not duplicate your error using the above xml, but the DatasourceName needs the trailing \ for DPM to run the script.

       <DatasourceScriptConfig DataSourceName="C:\">

    To troubleshoot this further on your end preform the following to enable verbose logging.

    1) On the protected server, run regedit and ADD the following value:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager
    TraceLogLevel:REG_DWORD:0x43e

    2) Stop DPMRA service on the protected server.
         net stop dpmra

    3) On the DPM Server, initiate a sync or recovery point for that datasource.

    4) After it completes (or fails) on the protected server open the C:\Program Files\Microsoft Data Protection Manager\DPM\Temp\DPMRACurr.errlog in notepad and search for the following string

        CCreateSnapshotSubTask::ExecutePreScript

    That will be the start of looking to see if the xml has information about running the pre and post scripts - there should be details about why it is failing.

    When done, delete or rename the TraceLogLevel registry value and restart DPMRA to turn off verbose logging.  


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by ThomasJF Thursday, August 8, 2013 1:16 PM
    Wednesday, August 7, 2013 5:07 PM
    Moderator
  • Thanks you for your inputs. The tip with the TraceLogLevel helped me a lot.

    here are the working config lines:

       <DatasourceScriptConfig DataSourceName="C:">
         <PreBackupScript>C:\DDPMAgentScript\PreBackup.cmd</PreBackupScript>
         <PostBackupScript>C:\DDPMAgentScript\PostBackup.cmd</PostBackupScript>
         <TimeOut>30</TimeOut>

    I would bet that I tried this before.... but never mind, it now works.

    PS: with "C:\" in the definition file the trace writes "Could not find script config for C:"...

    Thursday, August 8, 2013 1:16 PM