Monday, August 17, 2009

Prepare for a DPM server disaster

The DPM SQL database (DPMDB) is the most crucial part of your DPM installation. The database contains all your protection group information and tape\disk catalogs.
When this database gets corrupted (believe me this can happen), you will loss all this configuration data.

When you have a single DPM server implementation, you can protect this database in two ways.

  • Make a backup\Dump to disk: dpmbackup command
  • Make a backup to tape: Create a protection group to include the DPM database

I would recommend to use both techniques to protect your DPM databases.The disk solution allows you to recover the DPM quickly when it gets corrupted. The backup to tape allows you to recover the configuration when the full DPM server has become unavailable.

Make a DPM database backup to disk

  • Use the command DPMbackup –db to create a dump of the database to the folder %program files%\Microsoft Data Protection manager\DPM\Volumes\ShadowCopy\Database Backups.
  • When you schedule this command to run frequently,it is recommended to save multiple versions of the database. With the DPMbackup –db command you cannot specify a alternative location for the database backup. Therefore it is recommended to copy your database dump to an alternative location. This will prevent you from overwriting a good working copy with a more recent corrupt version.

Restore a DPM database from disk

Before you start:

  1. Secure the current DPMDB.BAK database backup, by renaming it: %program files%\\Microsoft DPM\DPM\Volumes\ShadowCopy\Database Backups
  2. Next, create a backup of the running database in DPM  with the following command: dpmbackup –DB Also rename this DPMDB.BAK file to DPBDB_before_restore.BAK

Restore database:

  1. Use DPMSync to attach the database to DPM.
    • DPMSync –RestoreDB –DBLoc (location and name of the database secured in step 1 of before you start) When this database is also corrupt you can use a previous saved version of the database
    • DPMSync takes the DPM service offline and attaches the backed up database to SQL Server.
  2. Run the command DpmSync –sync
    • This will sync the database with the available recovery points
  3. Start DPM 2007 Administrator Console. You now have some protection errors to resolve.
  4. Secure now the working DPM DB running: DPMBACKUP –DB from the DPM server

Make a DPM database backup to disk

Enable local protection (When using the local SQL installation): 

  • Starting with DPM 2007 SP1 it is possible to backup the local files of the DPM server.
  • To enable it you need a powershell command (DPM Management Shell): Set-DPMGlobalProperty –AllowLocalDataProtection $true

Protect SQL database:

  • Create a new protection group
  • Select the local DPM server and select under SQL the DPMDB
  • Use long-term protection using tape
  • Specify the protection schedule

Recover a DPM database from disk
This is a not the most pleasant solution, since you have to uninstall and reinstall DPM2007. You should only use this when the recovery from disk is not possible

  1. create a backup of the running database in DPM  with the following command: dpmbackup –DB ,rename this DPMDB.BAK file to DPBDB_before_restore.BAK
  2. Place the tapes with the most recent DPM database backup
  3. Uninstall Microsoft System Center Data Protection Manager 2007 through the Add/Remove Programs applet in Control Panel.


    Remember to select Retain disk-based recovery points.

  4. Restart the computer.
  5. Delete the DPM database using SQL Server Management Studio.
  6. Install DPM 2007.
  7. Restart the computer
  8. Install the same level of Service pack and latest hotfixes
  9. Restart the server again
  10. Secure the now clean Database
    • Run the command dpmbackup –DB
  11. Open the Libraries tab on the Management tab of DPM Administrator Console.
  12. Click Rescan on the Actions pane. Go to Updating Tape Library Information for more information on using the Rescan option.
  13. Select the library from the list and click Inventory libraries… and perform a detailed inventory from the Actions pane.
  14. Select the imported tape from the list and click Recatalog imported tape on the Actions pane.
    • Do this for all tapes on which the DPM database resides
  15. Open the Recovery tab from DPM Administrator Console.
  16. Select the DPMDB by expanding the External Tapes node.
  17. Click Recover on the Actions pane.
  18. Restore the database files to a separate folder
  19. All DPM and SQL services must be stopped.
  20. Rename the following Database files .\DPMDB:
    • a) DPMDB2007RTM.mdf to DPMDB2007RTM.mdf.old
    • b) DPMDB2007RTM_log.ldf to DPMDB2007RTM_log.ldf.old
  21. Copy the restored database files to the location .\DPMDB
  22. Start first the SQL services, next start the DPM services
  23. When all services are started again:Run the command DpmSync –sync
    • This will sync the database with the available recovery points
  24. Start the DPM administrative console
    • If this works > DPM should be up, you now have some protection errors to resolve
    • If this not work try step 15 to 23 for with the two other versions of the database

***Secure the now working database Run the command dpmbackup –DB

No comments:

Post a Comment