Tuesday, March 15, 2011

DPMbackup Invalid command -db.

The DPMbackup.exe command is a very useful tool to make a copy of your DPM database to a disk location. Using this copy you can easily recover from a corrupt database.

For our customers a use a scheduled task to make a dump of the DPM to disk on a daily bases. It has saved me from a full reinstall more then ones.

The issue I run in to is that the command DPMbackup –DB works perfectly from the command prompt, but when I use it in a script it gives me the following eror  {Error: Invalid command –db.}

In my case it worked to specify the instance name as well. Like: DpmBackup.exe -db -instanceName MSDPM2010

Full Script

@Echo off
SET LOGFILE="E:\Backup_folder\SQL Daily Backup\DPMSQLBACKUP.LOG"
SET backupfile="C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy\Database Backups\DPMDB.bak"
SET backuppath="E:\Backup_folder\SQL Daily Backup\"

for /f "tokens=2,3,4 " %%x in ("%date%") do set dstamp=%%z%%y%%x
for /f "tokens=1,2,3 " %%x in ("%time%") do set tstamp=%%x%%y%%z

ECHO ===================================================================>> %LOGFILE%
ECHO %dstamp% - %tstamp% >> %LOGFILE%
ECHO ===================================================================>> %LOGFILE%
DpmBackup.exe -db -instanceName MSDPM2010 >> %LOGFILE%
if not exist %backupfile% goto NOTEXIST
IF Exist %backuppath%\DPMDB_05.* del %backuppath%\DPMDB_05.*
IF Exist %backuppath%\DPMDB_04.* ren %backuppath%\DPMDB_04.* DPMDB_05.*
IF Exist %backuppath%\DPMDB_03.* ren %backuppath%\DPMDB_03.* DPMDB_04.*
IF Exist %backuppath%\DPMDB_02.* ren %backuppath%\DPMDB_02.* DPMDB_03.*
IF Exist %backuppath%\DPMDB_01.* ren %backuppath%\DPMDB_01.* DPMDB_02.*
IF Exist %backuppath%\DPMDB.* ren %backuppath%\DPMDB.* DPMDB_01.*

ECHO. >> %LOGFILE%
copy %backupfile% %backuppath% /Y >> %LOGFILE%
GOTO END

:NOTEXIST
ECHO DPMSQL DB BACKUP does not exist!!! >> %LOGFILE%

:END
ECHO ===================================================================>> %LOGFILE%
ECHO. >> %LOGFILE%
ECHO. >> %LOGFILE%

Six copies will remain on this location. DPMDB.bak is the most recent DPM SQL Backup and DPMDB_05.bak is the oldest backup file.

Thursday, January 13, 2011

Instant recovery of Hyper-V and other DPM data

Another post from my CFIT colleague Marcel van den Berg. This time about dBeamerDPM an add-on for DPM that allows IT administrators to achieve a Recovery Time Objective (RTO) of near zero by an instantly recovery  from a Microsoft Data Protection Manager (DPM). Other usage cases for dBeamerDPM are instant setup of a test environment.

For more info read his post Instant recovery of Hyper-V virtual machines and other DPM data

image

Monday, January 10, 2011

DPM End User Recovery–Recap


Introduction
In my experience most restore requests are from users that accidentally deleted a file or replaced a good copy of a file by a bad copy. For a backup administrator this is a time consuming business. Wouldn’t it be nice if users could take care of these restores themself.
DPM allows users to restore their own files from the file server without the help of the backup administrator. This option is called End User Recovery (EUR)
Enabling users to recover previous versions of documents isn’t totally new – actually it is part of the technology build in to Windows 2003, called Shadow copy of shared folders.
The big difference is that that the copies no longer need to be stored on the file server itself, but that users are redirected to the DPM server. The beauty of this all is that it is totally transparent to the users. Users can restore copies of their own files for as long as you configured short-term disk protection.

How to enable EUR for DPM

Description

Example

For EUR is a schema change required.
Make sure your account has the correct premisisons.

Domain admin + Schema admin permissions

To install the necessary Schema extension log onto the Domain Controller that holds the Schema master role and then create a drive mapping to the DPM installation directory on the DPM server, C:\program files\Microsoft DPM\DPM\End User Recovery, and run the DPMADSchemaExtension.exe.

clip_image002

Click on run.

clip_image004

Click yes, to start the Schema extension.

clip_image006

Enter the DPM server name

Note: this is not the FQDN name of the server, but just the server name.

clip_image007

Enter your domain name.

This is the domain the DPM resides in. This should be the FQDN

clip_image009

This field can be left blank if the DPM server is in the same domain as the File server that you want to protect

clip_image011

Click OK.

clip_image013

Click OK.

clip_image015

Logon to the DPM server and Select Configure end user recovery.

The Active Directory button should be greyed out now.

clip_image017

EUR will be available to users after the next synchronization.

clip_image019

Set-up DPM protection Group

The Retention Range and the File Recovery Point are important values when you set-up the Protection group for the file server.

The Retention Range Value specifies how long versions of the users files are available for recovery.

The File Recovery Point value specifies how many versions per day are created. Only when the file has been changed a new version is created.

clip_image021

The Client
Windows Vista and Windows 7 Clients have the building functionality to use the DPM EUR as there prvious version point. For Windows XP clients to use End User Recovery a hotfix should be installed KB895536 describes the needed hotfix for the Shadow copy (Timewarp) client. Please also take a look at KB941133

Results

The result is that users can choose to restore one of the previous versions of the document direct from their Explorer interface.

clip_image023

DFS
In a DFS namespace, links can have multiple targets that contain replicated data. The file recovered by an end user may not be the expected file version, if you protect multiple DFS targets.

For example, the DFS namespace \\public\apps can connect users to the actual targets of \\public1\apps or \\public2\apps. If both targets are protected by DPM and the user attempts to recover a file from the DFS link, the Shadow Copy Client will display the shadow copy of the file from the first available protected target. If the targets are not synchronized at the time that the shadow copy is created, the user may recover an incorrect version of the file.

When you protect only one target of a DFS link and a user attempts to recover a file, the Shadow Copy Client will check the targets of the DFS link and connect the user to the protected target rather than the first available target.
(Taken from:http://technet.microsoft.com/en-us/library/cc161316.aspx)

Schema Change drill down
The DPMADSchemaExtension tool performs the following tasks to support end-user recovery:

  • Extends the schema
  • Creates a container (MS-ShareMapConfiguration)
  • Grants the DPM server permissions to change the contents of the container
  • Adds mappings between source shares and shares on the replicas

With ADSI you can check the attributes added by DPM.

Domain
CN=System
CN=MS-ShareMapConfiguration


image
(Taken form:http://technet.microsoft.com/en-us/library/bb795762.aspx)

Limit Previous version Client
The previous version client can be very helpful to users and Administrators. But there is also the risk that users overwrite files that they should have.

To limit the risk you can restrict who has the ability to restore using a Group Policy or restrict to make a copy of a file and not overwrite.

Disable restore Button 
This functionality prevents a client from overwriting the current version of a file with an earlier version of the file. The client can only copy the earlier version of a file to an alternative location.
To do this, type either of the following commands at the command prompt, and then press ENTER

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v NoPreviousVersionsRestore /t REG_DWORD /d 1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer /v NoPreviousVersionsRestore /t REG_DWORD /d 1

You can add the DWORD registry entry as part of a user's logon script.

We recommend that you add the DWORD entry to the HKEY_LOCAL_MACHINE subkey. We recommend this for the following reasons:
• The HKEY_LOCAL_MACHINE subkey is not overwritten by policy updates.
• The HKEY_CURRENT_USER subkey can be written to by logon scripts that are using nonadministrator permissions.

Disable the Previous Versions tab
To disable the Previous Versions tab on individual client computers, follow these steps:
Type either of the following commands at the command prompt, and then press ENTER:

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v NoPreviousVersionsPage /t REG_DWORD /d 1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer /v NoPreviousVersionsPage /t REG_DWORD /d 1

(Source Technet Form answer by Mike Jacquet)

Related links and information
· Microsoft Technet article about End-User Recovery Considerations
· On Scug.be about EUR when file server is down
· Matt Marlor about the power and risk of End User Recovery - DPM End User Recovery - Powerful but Dangerous?

Thursday, January 6, 2011

Disaster Recovery with DPM 2010 and Veeam B&R

Creating a backup up is one thing, but being able to perform a good and reliable recovery is different story. There is only one way to be sure you can and that is.. test .. test .. test.
Most (backup) administrators perform a test restore on a regular basis, but what if your full environment is destroyed.
A disaster situation like this is much more complicated, there are always dependencies you did not though of before.

My CFIT Colleague Marcel van der Berg  performed a disaster recovery test. In his test case only the tapes were left to work with. In his blog-post things-to-consider-when-using-microsoft-dpm-and-veeam-backup-replication, he describes the dependencies he found during the DR test.

image

Good reading..

Tuesday, November 16, 2010

System Center Data Protection Manager 2010 QFE Rollup [KB 2250444]

There is a rollup packages for DPM 2010 available.

This hotfix rollup resolves the following issues:

  • You cannot protect the Microsoft Exchange Database Availability Group (DAG) on a secondary DPM 2010 server.
  • You are prompted to restart a client computer after you install an agent on the client.
  • DPM services crash, and you receive the error, "Unable to connect to the database because of a fatal database error."
  • MSDPM crashes, and event ID 945 is logged in the event log.
  • When you change a Protection Group, add a very large database, change the disk allocation, and then commit the Protection Group, DPM 2010 does not honor the user intent, and instead, DPM 2010 sets the sizes of replica and shadow copy volumes to the default sizes.
  • The Management tab does not link to information about the latest Microsoft Knowledge Base article for DPM 2010.
  • You receive the message, "Computers not synchronized," when you try to replicate DPM 2010 databases to a System Center Operations Manager.

* A reboot of the DPM server is required.
*The protected servers do not need a reboot.

Friday, September 17, 2010

Uninstall SQL 2005

After a successful upgrade from DPM 2007 to DPM 2010 you can safely remove the SQL 2005 instance. The steps are shown below. Steps are for a local instance of SQL.

image 
1) Start Program and features. Find SQL 2005 and select uninstall

image 
2) Select the MS$DPM2007$ instance, also select the Workstation Components and click next.

image
3) Check the confirmation window and click Finish.

image 
4) On Windows 2008 R2 you could receive the message “the program has known compatibility issues” Click Run Program.

image
5) When you receive the error. The following applications should be closed before continuing the installation.

image
6) Stop all related SQL 2005 services
-SQL server (MS$DPM2007$)
-SQL server agent (MS$DPM2007$)
-SQL server Reporting service MS$DPM2007$)

7) Press retry and the de-installation will complete