In this recipe, we will create a full database backup on mirrored backup files.
We will use the
AdventureWorks2014 database for this recipe. We will create a mirrored backup of the database, and both timestamped backup files will be stored in
C:\Backup. Feel free to substitute this with the database you want to use with mirrored backups.
Note that mirrored backups are only supported in Developer or Enterprise editions of SQL Server. Please ensure you have either of these editions before proceeding with the recipe.
Here's the T-SQL syntax that will be generated by this PowerShell recipe:
BACKUP DATABASE [AdventureWorks2014] TO DISK = N'AdventureWorks2014.bak' MIRROR TO DISK = N'C:\Backup\AdventureWorks2014_Full_20150314092409_Copy1.bak' ...