The backup solution for restoring databases and log files that are relocated and deleted
after a virtual machine (VM) backup requires Data Protection for Microsoft Hyper-V and Data Protection for Microsoft SQL Server.
Before you begin
Decide where the database and log file data is to be restored.
About this task
When you restore the backups, and complete a full database restore operation from the backup,
Data Protection for Microsoft Hyper-V restores the files to their
original location.
If database or log files are relocated during the backup cycle, Data Protection for Microsoft SQL Server restores the files in their original
locations.
If any databases or log files were created during the backup cycle, Data Protection for Microsoft SQL Server re-creates the new files. If database or
log files were deleted during the backup cycle, those files are not restored.
Procedure
-
Use Data Protection for Microsoft Hyper-V to back up the
VM.
Consider the following example.
You back up VM kingston40 that
includes Microsoft SQL Server database
moose at 2:00 PM The Microsoft SQL
Server database consists of the following files at 2:00 p.m:
- C:\sqldbs\moose\moose.mdf
- C:\sqldbs\moose\moose_log.ldf
-
Relocate a database backup to an alternate location.
Consider the following example. You want to relocate the database
moose at
6:00 PM to the following location:
- E:\sqldbs\moose\moose.mdf
- F:\sqldbs\moose\moose_log.ldf
-
Add files to the database backup.
Consider the following example. You want to add two new files to database
moose at 7:00 PM The database now consists of the following files:
- E:\sqldbs\moose\moose.mdf
- F:\sqldbs\moose\moose_log.ldf
- E:\sqldbs\moose\moose2.ndf
- F:\sqldbs\moose\moose2_log.ldf
-
Use Data Protection for Microsoft SQL Server to complete a log
backup.
Consider the following example. You start a log backup at 9:00 PM
-
Restore the database backup.
Consider the following example.
You want to restore the entire moose
database.
- You restore the full database from the Data Protection for Microsoft Hyper-V backup with
runrecovery=false.
- At 9:00 p.m, you restore the log backup and apply it.
The
moose database is restored to the following location:
- C:\sqldbs\moose\moose.mdf
- C:\sqldbs\moose\moose_log.ldf
- E:\ sqldbs\moose\moose2.ndf
- F:\ sqldbs\moose\moose2_log.ldf
The full VM restore restores the files to their original location. When you applied the log
backup, the files that were added after the relocation are restored.