SharePoint Backup Augmentation Cmdlets provide administrators with additional PowerShell cmdlets to complement and extend SharePoint's native backup cmdlets.Target Audience
I created this solution for a very specific audience: SharePoint 2010 and 2013 administrators who protect their farms through scripts that are built using the out-of-the-box (OOTB) backup and restore PowerShell cmdlets. Sometimes this approach is deliberate and by choice, and sometimes it is out of necessity (e.g., due to limited resources); regardless, I think that the OOTB PowerShell cmdlets do an admirable job of providing protection for most small to mid-size SharePoint environments.Capabilities
Unfortunately, there are some pretty significant capability gaps that administrators have to work around when building their PowerShell backup scripts. That's where the SharePoint Backup Augmentation Cmdlets come in. The cmdlets address several gaps, including the following:
- Information on backup operations: The SharePoint Backup Augmentation Cmdlets (via the Get-SPBackupCatalog cmdlet) make it easy to determine how much space your backups are consuming, whether or not there were errors on the last backup, how long backup operations take to run, and more.
- Archiving: It is oftentimes desirable to maintain archives of past backup sets, but the platform tools provide no help in this area. With SharePointBAC and the Export-SPBackupCatalog cmdlet, one or more older backup sets can be exported from the backup location and archived as a zip file to save space.
- Grooming: When using Backup-SPFarm, there is no built-in mechanism to "rotate" backups. Each new backup takes up disk space, and deleting old backups (grooming) is difficult to do in any automated fashion. The SharePoint Backup Augmentation Cmdlets (using the Remove-SPBackupCatalog cmdlet) address this gap.
- Notification: Many administrators like to receive an e-mail notification following a backup operation. Through the Send-SPBackupStatus cmdlet, the SharePoint Backup Augmentation Cmdlets make it easy to send an e-mail summary of the last backup operation that was carried out.
The following basic screenshot shows the Get-SPBackupCatalog displaying information about a backup set. A backup catalog is first retrieved (as $bc
) and its details displayed. Archive, grooming, and notification actions can then be taken on the $bc
archive by piping it to one of the other SharePointBAC cmdlets. Acknowledgements
I believe in loudly calling out those who helped me -- whether they realize they did so or not. Without the contributions the following folks have made to the SharePoint community, my work in developing this solution would have taken much longer and have been significantly more painful:
- Gary Lapointe: for being the king of PowerShell cmdlet development. One of his online book appendices and other assorted resources proved invaluable in the creation of this project. Thank you, Gary!
- Matt Hester and Sarah Dutkiewicz for writing their Automating Microsoft Windows Server 2008 R2 with Windows PowerShell 2.0 book. Their chapter on PowerShell cmdlet development was a nice complement to the material that Gary had put together, and it afforded me some additional insight into the PowerShell cmdlet development process.
- Cheeso and Jaans for their DotNetZip Library here on CodePlex. The ability to generate a zip file during Export-SPBackupCatalog operations would not be possible without the excellent archive creation capabilities of the DotNetZip Library.