Using AfterBackup.bat to Archive a Backup Snapshot
To ensure that a recent backup snapshot is always available, it is recommended that you archive the backup snapshot every time the SMS backup task completes a backup cycle. Create several archives of the backup snapshot on removable media, and store it in different secure locations.
You can use the AfterBackup.bat file to run a third-party tool that automatically archives the backup snapshot every time you back up your site. After successfully backing up the site, the SMS backup task runs the AfterBackup.bat batch file. The AfterBackup.bat file integrates the archive and the backup operations, thus ensuring that every new backup snapshot is archived.
If your organization is using an archive solution that already archives data at the location that the Backup SMS Site Server task writes to, then you might choose to not create the AfterBackup.bat file. In this case, be sure to coordinate the SMS backup task schedule and your organization archive schedule as follows:
Schedule the organization archive of the SMS backup snapshots at least as often as the Backup SMS Site Servers task runs.
Schedule the organization archive of the SMS backup snapshots and the Backup SMS Site System task so they do not run at the same time. If both activities run at the same time, your organization archive might not copy the SMS backup files while they are being written, or the SMS backup task might not be able to write to the backup files while they are being archived.
Although the intended use of AfterBackup.bat is to archive SMS backup snapshots, you can use that file for other tasks that you need to perform 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 SMS site database.
Run a site health tool, or other health tools.
To use the AfterBackup.bat file
Prepare an ASCII file with commands that archive your backup snapshot, or that perform any other post-backup tasks your site requires.
Name the file "AfterBackup.bat" and save it in the SMS\inboxes\smsbkup.box folder. Now, every time the backup task runs successfully, it will run the AfterBackup.bat file.
Every time after the AfterBackup.bat file archives the site's backup snapshot, store that archive in a secure location.
For More Information
Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.