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:
- Secure the current DPMDB.BAK database backup, by renaming it: %program files%\\Microsoft DPM\DPM\Volumes\ShadowCopy\Database Backups
- 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:
- 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.
- Run the command DpmSync –sync
- This will sync the database with the available recovery points
- Start DPM 2007 Administrator Console. You now have some protection errors to resolve.
- 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
- 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
- Place the tapes with the most recent DPM database backup
- Uninstall Microsoft System Center Data Protection Manager 2007 through the Add/Remove Programs applet in Control Panel.
Important
Remember to select Retain disk-based recovery points.
- Restart the computer.
- Delete the DPM database using SQL Server Management Studio.
- Install DPM 2007.
- Restart the computer
- Install the same level of Service pack and latest hotfixes
- Restart the server again
- Secure the now clean Database
- Run the command dpmbackup –DB
- Open the Libraries tab on the Management tab of DPM Administrator Console.
- Click Rescan on the Actions pane. Go to Updating Tape Library Information for more information on using the Rescan option.
- Select the library from the list and click Inventory libraries… and perform a detailed inventory from the Actions pane.
- 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
- Open the Recovery tab from DPM Administrator Console.
- Select the DPMDB by expanding the External Tapes node.
- Click Recover on the Actions pane.
- Restore the database files to a separate folder
- All DPM and SQL services must be stopped.
- Rename the following Database files .\DPMDB:
- a) DPMDB2007RTM.mdf to DPMDB2007RTM.mdf.old
- b) DPMDB2007RTM_log.ldf to DPMDB2007RTM_log.ldf.old
- Copy the restored database files to the location .\DPMDB
- Start first the SQL services, next start the DPM services
- When all services are started again:Run the command DpmSync –sync
- This will sync the database with the available recovery points
- 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