To restore a database, begin by restoring the most recent full backup of the database, followed by all the database logs, that is, backups made with the Backup mode set to either incremental or differential .
When a database is restored, if the database does not yet exist, Yosemite Server Backup will create the database where the database was originally located.
To restore a lost or damaged database
If the transaction log of the damaged or inaccessible user database is on an undamaged device, use either a DUMP TRANSACTION statement on the SQL server or use a Yosemite Server Backup Incremental backup to backup the transaction logs before proceeding. (This lets you preserve up-to-the minute transactions that are not included on the backup tape.)
During the restore processes, Yosemite Server Backup recreates the database and all segments exactly as they existed when the backup was performed. To do this, Yosemite Server Backup first determines if the database exists.
If the database exists, Yosemite Server Backup uses the database as is without any further processing or changes.
If you are restoring the database because the data in the database is no longer needed or is incorrect, skip to step 3. The following instructions are for recreating database devices and the database which had existed previously.
If the database does not exist, Yosemite Server Backup next identifies the database devices on which the database was originally located.
- If the appropriate database device already exists, Yosemite Server Backup uses that device as is without further processing.
If the database device does not exist, Yosemite Server Backup recreates the database device at its original location and with its original size. After all the database devices are created, Yosemite Server Backup then creates the database with all the original options at the original locations.
To avoid this problem, manually recreate the database device at some other valid location. The new database must be at least as large as the original database device since Yosemite Server Backup will attempt to create a database segment on it that is the same size as the original database.
Create additional restore jobs to restore each transaction log backed up after the full database restore. You must create and run a separate restore job for each transaction log.
For example, if you ran a full backup on Friday and incremental jobs (that is, jobs that backed up only the transaction logs) on the following Monday and Tuesday, perform the following steps:
First restore the database using Friday’s version of the database.
Create a run and restore job that restores Monday’s version using Monday’s transaction log.
Create and run a job that restores Tuesday’s version using Tuesday’s transaction log.
In the last incremental restore job, click Advanced Options and select the Finalize recovery of MS SQL databases check box. If you do not select this check box, the database will be offline