Tag Archives: restore

Ahsay restore Microsoft SQL (MSSQL) server database

If you want to restore a Microsoft SQL database, from a fuld backup, and put some transaction log file into it.  (This backup has backup by ahsay)

This is the why to do it:

  1. Start Microsoft SQL Server Management Studio
  2. Right click on Databases, and select restore database

  3. Type a database “To database”, and select from device , and press the butten with the 3 dots (…)

  4. Select file, and then click Add

  5. Select the database file you want to restore, and click ok

  6. Then select options, and click “Leave the database non-operational, and do not roll back uncommitted transactions. (Restore with NORECOVERY), then click OK
  7. Start a new query, and type this (Change it to yours database and files).
  8. RESTORE LOG RestoreTest
    FROM DISK = ‘F:\RestoreTest\2011-09-13(09-00-00)_LOG_RestoreTest_2011.bak’
    WITH NORECOVERYRESTORE LOG Farma_test
    FROM DISK = ‘F:\RestoreTest\2011-09-13(10-00-00)_LOG_RestoreTest_2011.bak’
    WITH NORECOVERY

    RESTORE LOG Farma_test
    FROM DISK = ‘F:\RestoreTest\2011-09-13(11-00-00)_LOG_RestoreTest_2011.bak’
    WITH NORECOVERY

    RESTORE LOG Farma_test
    FROM DISK = ‘F:\RestoreTest\2011-09-13(12-00-00)_RestoreTest_2011.bak’
    WITH NORECOVERY

  9. When you have takende the sekund last backup file, just type this:
  10. RESTORE LOG Farma_test
    FROM DISK = ‘F:\RestoreTest\2011-09-13(13-00-00)_RestoreTest_2011.bak’
    WITH RECOVERY

Microsoft Exchange 2010 – Ahsay restore to recovery mailbox database / storage group.

Ahsay have no support for native restore to Exchange recovery group, but here is a workaround of that problems.

First create a recovery storagegroup
New-MailboxDatabase -Recovery -Name RDB1 -Server exch2010 -EdbFilePath “F:\Backup\Restore\Data\rdb1.edb” -LogFolderPath “F:\Backup\Restore\Log”
Where RDB1 is the name of the Recovery database and Exch2010 is the name of the servere where recovery database should be located.

Restore the Exchange 2010 database to a alternative location in ahsay. With both logfiles and the database files, restore it to “F:\Backup\Restore\Data\Mailbox Database.edb” or where you location is.

Then run repair of the restored database.
Eseutil /p “F:\Backup\Restore\Data\Mailbox Database.edb”

Then mount the database
Mount-Database -Identity ‘Mailbox Database’

Example restore a mailbox to a Restore mailbox in the real database.
Restore-Mailbox -Identity ‘mailbox_to_restore_content_to’ -RecoveryDatabase RDB1 -RecoveryMailbox ‘Mailbox_Restore’ -TargetFolder Recovery

This will create a folder name Recovery under mailbox_to_restore_content_to, with the content of Mailbox_Restore

[PS] C:\Recovery20110909>Restore-Mailbox -Identity jvrestore -RecoveryDatabase RDB1 -RecoveryMailbox ‘Jesper Vernegaard’
-TargetFolder Recovery