none
Script Fails to Run RRS feed

  • Question

  • I am trying to run a batch file script after a directory that archives logfiles once the directory is successfully backed up.  I can run the script manually so I know it works, but I cannot get it to run through DPM.  Is there a log file that I can use to see if the DPM agent is attempting to run the script?  I have the script entered into the ScriptingConfig.xml file.

    <?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="O:\oracle\oradata\dbkprd\archives">
         <PostBackupScript>C:\Batchfiles\clearOArchives.cmd</PostBackupScript>
         <TimeOut>30</TimeOut>
       </DatasourceScriptConfig>
    <DatasourceScriptConfig DataSourceName="C:\oradata">
         <PostBackupScript>C:\Batchfiles\ClearCArchives.cmd</PostBackupScript>
         <TimeOut>30</TimeOut>
       </DatasourceScriptConfig>
    </ScriptConfiguration>

    The script itself uses robocoy to move the files to another directory.

    Thanks

    Steve


    SteveH
    Thursday, March 17, 2011 2:40 PM

All replies

  • anyone?
    SteveH
    Tuesday, March 22, 2011 7:01 PM
  • Steve,

    The datasource name should be just "O:\" even though you protected a directory under it. Let me know if that works for you.


    Thanks, Kapil Malhotra [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, May 16, 2011 4:47 AM
    Moderator
  • Thanks for the response.  I change the datasource to "O:\"  unfortunately, still no go.  The backup appears to run but the script is not processed after the the successful recovery point creation.

    I really need someway to debug the process - is there nothing that will tell me what DPM is doing / failing to do?


    SteveH
    Tuesday, May 17, 2011 8:35 PM
  • I found some conflicting information off of the technet blog...  Note the datasource is not the root directory.

    sample script from http://blogs.technet.com/b/dpm/archive/2010/10/13/how-to-use-a-pre-backup-or-post-backup-script-to-reset-the-archive-bit-in-system-center-data-protection-manager.aspx

    <?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:\DataDirectory">
    <PostBackupScript>"C:\SetAcrhiveBit.cmd"</PostBackupScript>
    <TimeOut>30</TimeOut>
    </DatasourceScriptConfig>
    </ScriptConfiguration>


    SteveH
    Tuesday, May 17, 2011 8:39 PM
  • I copied exactly the script found at the above site including the batch file.  I setup a directory (C:\DataDirectory) and populated it with files.  I then turned the archive bit off on the files.  I tested the batch file and it turned the archive bit back on - so I know the batch file works.  Finally, I set a backup job that only backs up this new directory.  The Job runs with no errors, however, there does not appear to be any attempt to run the batch file.  I really need to get this working and would appreciate if this could be escalated.

     

    Thanks

    Steve


    SteveH
    Wednesday, May 18, 2011 12:08 PM
  • Hello Steve,

    Please remember that forum support is best effort free support. The only escalation would be to open up a paid support incident with Microsoft.  In this case however I do not feel that is neccessary as the DPM team does not support writing scripts.  We can make suggestions in regards to our experiences and testing but if you were to open up a case with Microsoft DPM team to write you a custom script that would not be supported.  There will however soon be a DPM powershell forum soon developed in order to share knowledge.


    Thanks
    Shane
    Wednesday, May 18, 2011 1:58 PM
  • Surely you must be joking!  First off I am a paying technet member which is supposed to entitle me to professional forum support from Microsoft employees.  2nd. the script I am using is directly from a Microsoft blog.  3rd, the post ScriptingConfig.xml design is yours - not mine and is once again (for troubleshooting reasons) copied directly from the Microsoft DPM blog site listed above.  If I had my way, DPM would just reset the archive bit (like oh um EVERY OTHER BACKUP SOFTWARE!) - then my script would just run a cleanup operation based on a scheduled task and the archive bit.  What I am looking for is not scripting help per se, but help debugging why DPM is not processing the ScriptingConfig.xml file and even triggering my script.
    SteveH
    Wednesday, May 18, 2011 2:45 PM
  • From the deafening silence am I to assume that there is no logging or debugging of the XML script so that I can troubleshoot this issue?
    SteveH
    Monday, May 23, 2011 3:36 PM
  • I also have the same problem, unfortunatley couldn't find the answer. Did you managed to solve it in the meantime?
    Thursday, June 2, 2011 10:16 AM
  • No - I have not found a resoluton.  I run my log cleanup via task scheduler, but I really have no way of ensuring that the logs have been backed up by DPM before the scheduled deletion of the logs take place, so it is not a good solution.  Microsoft has apparently flagged this question as do not respond since no-one has responded in some time.  I am seriously considering on reposting it - every day if neccesary to get it escalated.

     

    Really all I asked for was a log or debug file I could look at to see what (if anything) was happening.  They won't even provide that much support.


    SteveH
    Thursday, June 2, 2011 12:04 PM
  • Yes, it really is odd that such masive application doesn't have logging.
    Thursday, June 2, 2011 1:32 PM