Data Protection Manager (DPM): Using Pre-backup Or Post-backup Script to Reset Archive Bit

Here's a good tip you might find handy. Say you've a legacy app or some other need that requires the archive bit to be reset for data which's being backed up. Given the fact that DPM doesn't use Archive bit but instead uses USN Change journal you'll have to accomplish this using a Pre-Backup or […]

Here's a good tip you might find handy. Say you've a legacy app or some other need that requires the archive bit to be reset for data which's being backed up. Given the fact that DPM doesn't use Archive bit but instead uses USN Change journal you'll have to accomplish this using a Pre-Backup or Post-Backup script. In following example, we use a Post-Backup script to set Archive bit on all the files in C:\DataDirectory recursively after backup is done:

  1. Edit "%programfiles%\Microsoft Data Protection Manager\DPM\Scripting\ScriptingConfig.xml" to have following contents on 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="C:\DataDirectory"> 
        <postbackupscript>"C:\SetAcrhiveBit.cmd"</postbackupscript> 
        <timeout>30</timeout> 
      </datasourcescriptconfig> 
    </scriptconfiguration>

  2. Create a script in C:\SetAcrhiveBit.cmd locally on the Protected Server to have following contents:

    cd /d C:\DataDirectory 
    attrib  /S  +A      *

That's it!

[Source]