You may want to import a database backup on multiple disks as multiple copies. For example, suppose you have a storage that you use for backup and you regularly receive your backups here.
But let’s assume that you need to backup both storage and an external disk for a while. You can copy your backups on the storage to this external drive. Or you can take your backups in multiple copies and forward one to your default storage and the other to the external drive. To do this, you need to use the mirror command. You can perform as follows.
In the following script, the backup of the AdventureWorks2014 database is taken into both “C:\Backup\” and “D:\Backup\” paths. The backups in these two paths are exactly the same.
1 2 3 4 5 6 |
BACKUP DATABASE AdventureWorks2014 TO DISK = 'C:\Backup\AdventureWorks2014.bak' MIRROR TO DISK = 'D:\Backup\AdventureWorks2014Mirror.bak' WITH FORMAT, NAME = N'AdventureWorks2014-Full Database Backup', STATS = 1 GO |