The first time the Backup ConfigMgr Site Server maintenance task runs, it produces a backup snapshot, which you can use to recover your system in the event of a failure. When the backup task runs again during subsequent cycles, it creates a new backup snapshot that overwrites the previous snapshot. As a result, the site has only a single backup snapshot. This can be risky because an earlier backup snapshot won’t be available if you need it.

It is therefore recommended to archive the backup snapshot. As a best practice, there should be multiple archives of backup snapshots for the following reasons:

Using the AfterBackup.bat File

After successfully backing up the site, the Backup Site Server task automatically attempts to run a file named AfterBackup.bat. The AfterBackup.bat file is not installed during site installation and must be created manually by the administrator. If an AfterBackup.bat file exists, and is stored in the correct directory, the file will automatically run after the backup task has completed. The AfterBackup.bat file allows you to archive the backup snapshot at the end of every backup operation, and automatically perform other post-backup tasks if desired. The AfterBackup.bat file integrates the archive and the backup operations, thus ensuring that every new backup snapshot is archived. If an AfterBackup.bat file does not exist it has no effect on the backup operation, but in order to archive the backup snapshot, another method must be used.

Although the intended use of the AfterBackup.bat is to archive backup snapshots, you can create an AfterBackup.bat file to perform additional tasks at the end of every back up operation, such as:

  • Run a SQL Server DBCC test to verify that there are no integrity problems with the site database.

  • Run a site health tool, or other health tools.

See Also