none
Restore DPM Server RRS feed

  • Question

  • I would like to perform test where if my DPM server crash then how can I restore its database. Could you please suggest on the same.

    As of now I am not planning to deploy 2 DPM servers where one can take care of backup of other. How can I achieve this ?

    Friday, October 18, 2019 12:03 PM

Answers

  • Hi,

    Scenario 1

    The DPM server has crashed, but the DPM server is located on another server.

    Procedure

    1. Install a fresh new Windows Server (same OS as previously) with the same name and IP address as the crashed DPM server.

    2. Present the existing DPM storage that was used on the crashed DPM server, to the newly installed server.

    3. Install DPM and point to the existing DPM database.

    4. Once the installation is complete, synchronize the DPM database by running dpmsync -sync

    5. Run consistency checks.

    -------------------------------------------------------------------------------

    Scenario 2

    The DPM server has crashed, the DPM database was located locally on the DPM server, but there is backups of the DPM database located elsewhere.

    Procedure

    1. Install a fresh new Windows Server (same OS as previously) with the same name and IP address as the crashed DPM server.

    2. Present the existing DPM storage that was used on the crashed DPM server, to the newly installed server.

    3. Install a new SQL Server (same version as used previously).

    4. Restore the DPM database to the newly installed SQL Server.

    5. Install DPM and point to the existing DPM database.

    6. Once the installation is complete, synchronize the DPM database by running dpmsync -sync

    7. Run consistency checks.

    -------------------------------------------------------------------------------

    You'll also find some information in these links:

    Restore and synchronize the DPM database with DPMSync

    Recover a Microsoft DPM SQL Database

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SC2317 Monday, October 21, 2019 8:47 PM
    Friday, October 18, 2019 12:27 PM
  • All protected data will be in an inconsistent state after having restored the DPM database, this is normal behavior.

    Currently there's no other way, you will have to perform consistency checks.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SC2317 Monday, October 21, 2019 2:49 PM
    Monday, October 21, 2019 2:48 PM

All replies

  • Hi,

    Scenario 1

    The DPM server has crashed, but the DPM server is located on another server.

    Procedure

    1. Install a fresh new Windows Server (same OS as previously) with the same name and IP address as the crashed DPM server.

    2. Present the existing DPM storage that was used on the crashed DPM server, to the newly installed server.

    3. Install DPM and point to the existing DPM database.

    4. Once the installation is complete, synchronize the DPM database by running dpmsync -sync

    5. Run consistency checks.

    -------------------------------------------------------------------------------

    Scenario 2

    The DPM server has crashed, the DPM database was located locally on the DPM server, but there is backups of the DPM database located elsewhere.

    Procedure

    1. Install a fresh new Windows Server (same OS as previously) with the same name and IP address as the crashed DPM server.

    2. Present the existing DPM storage that was used on the crashed DPM server, to the newly installed server.

    3. Install a new SQL Server (same version as used previously).

    4. Restore the DPM database to the newly installed SQL Server.

    5. Install DPM and point to the existing DPM database.

    6. Once the installation is complete, synchronize the DPM database by running dpmsync -sync

    7. Run consistency checks.

    -------------------------------------------------------------------------------

    You'll also find some information in these links:

    Restore and synchronize the DPM database with DPMSync

    Recover a Microsoft DPM SQL Database

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SC2317 Monday, October 21, 2019 8:47 PM
    Friday, October 18, 2019 12:27 PM
  • I believe Scenario 1 means The DPM server has crashed, but the SQL server is located on another server.

    Also, I believe these methods points to "Back up with native SQL Server backup to a local disk" on this link https://docs.microsoft.com/en-us/system-center/dpm/back-up-the-dpm-server?view=sc-dpm-2019.

    Also there is another option "Back up with native SQL backup and DPM protection to a share protected by DPM", so could you please suggest which one is better ? Later one seems to be more complex than previous one.


    Friday, October 18, 2019 1:34 PM
  • It depends on your organization really, there is no right or wrong here, what is important is that you have working backups of your DPM database.

    Probably backing up SQL natively is easier and more comfortable, but this is just my opinion.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Friday, October 18, 2019 1:46 PM
  • Hi Leon,

    I have re-installed the DPM server. However, while installation it prompted for SQL instance(Which may have multiple databases) not existing Database. Also, it has created new database which has nothing.

    I explored and may be I need to either restore the backup of the database using SQL management studio or DPMSYNC -Restore command. I prefer DPMSYNC, but its not working as its not even detecting -restore cmdlet.

    Could you please assist and suggest. I have tried using both powershell and DPM Management shell.

    Sunday, October 20, 2019 2:50 PM
  • When re-installing DPM you need to provide the server name and SQL instance of where the existing DPM database is located.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Sunday, October 20, 2019 2:55 PM
  • I have done the same. However, as stated instance may have more than 1 database and while installing DPM it is not asking for database name to which it needs to be pointed.

    DPMSync -restoredb is also not working. Not sure where do we need to execute this command DPM shell or powershell ?

    Monday, October 21, 2019 11:01 AM
  • You should use a dedicated instance for DPM, if you're not you will not benefit from the free SQL Server license from System Center/DPM.

    Where was the DPM database located earlier? Was it on the same instance? If yes, re-install DPM to the same instance, once done, remove the newly (empty) created DPM database and attach the DPM database from the backup to the instance.

    The DPMSync.exe is located here: C:\Program Files\Microsoft System Center\DPM\DPM\bin\DpmSync.exe

    So you can use either the Command Prompt or PowerShell, change the directory to the bin directory and then run the DPMSync -RestoreDB command.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 12:07 PM
  • After installation, I have 2 databases as below. Once with long name is the new database that got created after re-installation. 

    

    I have SQL locally installed on the DPM server and reproting database is also under same instance. What do you mean by "attach the DPM database from the backup to the instance." ? If I delete the new database then how am I suppose to point DPM to old database because I'll be using .bak file to restore the database and if new database does not existing then .bak will not restore.

    DPMSync is recognized by powershell, however when I run full command it does not run.

    Monday, October 21, 2019 12:26 PM
  • Apologies, I'm mixing up things :-) No need to attach the database.

    Okay, so the database is locally installed, nothing happens when you run the DPMSync command?
    Can you show the command you're using?

    Example:

    DpmSync –RestoreDb -DbLoc "G:\DPM\Backups\2005\November\DPMDBBackup.bak"


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 12:33 PM
  • Thanks, I have done some changes now and will update you after executing this command. Could you please suggest if now Dpmsync -RestoreDb command succeeds then to which database this restore will happen ? New one or old one ? I presume it will be new one, however it's name does not look good, so could you please suggest something on that also like how can I change its name ?
    Monday, October 21, 2019 12:43 PM
  • It will be restored to the same name as it previously was using.

    When the DPM database name has a GUID in the name, it is because DPM has been upgraded, during the upgrade process it will add the GUID to the DPM database name.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 12:54 PM
  • This is the error, I get while executing this command

    Monday, October 21, 2019 1:15 PM
  • Make sure you write down the whole command manually, copying commands may become faulty, I'm especially thinking about the dashes in this case.

    Also to be safe run the dpmsync from it's location:


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 1:20 PM
  • I have run the command on DPM management shell now and its working this time. However, it is throwing below error.

    Error ID: 455
    Failed to attach database [DPMDB_XXXXdc2c61ac_ac02_4dd4_ba9e_6b53d5076bd1] at location [e:\dpm2.bak] to SQL server. Make sure that the SQL server services are running and you are restoring a valid DPM database backup.

    Detailed Error: The file 'E:\Program Files\MSSQL14.XXXX\MSSQL\DATA\MSDPM2012$DPMDB_XXXXX.mdf' cannot be overwritten.  It is being used by database 'DPMDB_XXXX'.
    File 'MSDPM2012$DPMDB_XXXX_dat' cannot be restored to 'E:\Program Files\MSSQL14.XXXX\MSSQL\DATA\MSDPM2012$DPMDB_XXXX.mdf'. Use WITH MOVE to identify a valid location for the file.

    I have replaced database name with XXXX while copying this error

    SQL services are running, something is still using the old database.

    Monday, October 21, 2019 1:24 PM
  • Try rebooting the server and perform the command again, this should release any locks on the files.

    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 1:27 PM
  • No Luck after restart :( still same.Not sure what is using those files causing the overwrite to fail.
    Monday, October 21, 2019 1:41 PM
  • Thanks. I am trying the SQL management studio to restore, unfortunately it is not responding as soon as I try to select local .bak file and will continue and update you.

    Can you please confirm which database do I need to overwrite while restoring old or new one ?

    Monday, October 21, 2019 2:13 PM
  • Unfortunately I can't tell which database is which in your environment, you should know which database was the one that was installed.

    Did you have two databases there before attempting to re-install/restore your DPM database?


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 2:18 PM
  • No, I uninstalled the DPM application without touching the SQL database. While re-installing I gave the SQL instance name that had existing database, but installation created new database with long name as below. I believe new installation is using database with long name, so is there way to rename it or we'll have to leave it as it is. 

    I have restored the database and overwritten database with long name and I can see the protection group but all are showing below status. Do I need to run some other command also to get it fix or run consistency check for all protected servers ? I have already run DpmSync -Sync command.

    

    Monday, October 21, 2019 2:31 PM
  • The DPM database "can" be renamed, but I wouldn't do anything now. 

    What are the error status message of the protection groups?

    You will need to perform consistency checks on all protected data.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 2:33 PM
  • Error is "Replica is inconsistent" on all protected servers. If we have 50 servers then we may have to run consistency check on all servers, is there a way to fix this if in case we have to restore the database ?

    Whats does DpmSync -ReallocateReplica will do it if I run it after dpmsync -sync ? Is there a way to avoid consistency check on protected servers.

    Monday, October 21, 2019 2:42 PM
  • All protected data will be in an inconsistent state after having restored the DPM database, this is normal behavior.

    Currently there's no other way, you will have to perform consistency checks.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SC2317 Monday, October 21, 2019 2:49 PM
    Monday, October 21, 2019 2:48 PM
  • Many thanks leon for your prompt response always, your help is much appreciated :)

    Could you please suggest how can I rename DPM database if required ?


    • Edited by SC2317 Monday, October 21, 2019 2:50 PM
    Monday, October 21, 2019 2:49 PM
  • You're welcome, make sure to document down all the required steps so that you know how to perform it in the future :-)

    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, October 21, 2019 2:50 PM