Posts Tagged ‘DPM’

So, I am quite a keen user of PowerShell and System Centre Orchestrator. Ok, so I recently had a request from a customer that went as follows “I need DPM to alert me when tapes are ready to  be taken off-site.”

DPM does not seen to have this functionality out of the box within the Graphical User Interface (GUI). All is NOT lost, Data Protection Manager has a PowerShell component and i was sure i could figure out a way to get this to work within PowerShell. Sure enough a solution in the form of PowerShell was found, so using this as a base, I modified the PowerShell script to suit my needs. It was also slightly modified to use with System Centre Orchestrator. The custoemr also wanted some colour and wanted the result formatted in HTML. primarily for reading purposes and auditing purposes. PowerShell code below and link here.

Import-Module DataProtectionManager
$date = Get-Date -Format "M-d-yyyy"
$path = "c:\DPMOffisteTapes\"
$filepath = $path + $date + ".html"
#creates the folder if it does not exist
New-Item -itemType file -Path $filepath
$AllLibraries = get-dpmlibrary 
$AllTapes = Get-Tape -DPMLibrary $AllLibraries
$offistereadytape = $AllTapes | Where-Object {$_.isoffsiteready -eq $true}
$a = "<style>"
$a = $a + "BODY{background-color:Green;}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:GreenYellow}"
$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:palegoldenrod}"
$a = $a + "</style>"
$offistereadytape | Select-object location, barcode , isoffsiteready|ConvertTo-Html -Head $a -Body "<H2>Offsite Ready Tapes</H2>" | out-file -FilePath $filepath

OK, so now we have the data in decent format.

image

So, with the more tapes that are ready, the more rows of data will be within the HTML.

Ok, so now we need to schedule the task. I know i could have used Task Scheduler and the like, however we have System Centre Orchestrator and with Service Management Automation available, more and more tasks will be automated. With this example, i decided to use Orchestrator.

So, I simply use a Monitor/Date Time to run the required activity at set intervals

image

I then run a DPM Script from the Data Protection Manager Integration Pack.

image

image

The filepath Variable is where the html (the full path to the html file) is written, this is especially helpful when sending the Email Message. (I know this can be done with send-mailmessage directly within the PowerShell code)

image

So there you have it, Some Orchestrator Magic with PowerShell and DPM.

(E-Mail me)

Follow me.

Facebook (Personal)

Twitter (Personal & System Centre)

Twitter (System Centre Focused)

Not that long ago, I ran into a strange issue with my Exchange Environment.I had already configured by Exchange Backups and these had been running for quite some already. However, now all of a sudden the backups are NOT running to completion. So, checking the size of the “LOG” drives. i see that the logs are not being cleared and this appears to be the issue for the backup not running to completion.

 

So, this is how you fix the issue.

Open the Exchange Console, on the affected Mailbox Store, enable Circular Logging (temporarily, not permanently as this can lead to other issues especially with backups), dismount and remount the Mailbox Store for the setting to take affect. Once the logs have been cleared, you can check this by checking the free space on your “LOG” drives. Once the logs are cleared. Go to the “Mailbox Store” and then disable “Circular Logging” and dismount and remount the Mail Store, Run your DPM backup again and all should be now fixed.

Hope this helps,

Follow me.

facebook-small322252222 twitter-small322252222

MCC11_Logo_Horizontal_2-color_thumb_

Not that long ago, I created an article about DPM and I referenced DPM commands to be run in the DPM shell and only now realised that not everyone has the DPM console installed as this is not the easiest console to install and get working.

So, I am now the Proud Owner of Learn Windows PowerShell in a month of Lunches and I am an now playing and have figured out how to import the necessary commands with Remoting. There are some steps you need to follow to get PSRemoting working across an enterprise, this might help.

Once this is done, let the Magic begin.

First, lets create a New-PSSession

1. New-PSSession –ComputerName <FQDN of DPM Server> (figured this one out the hard way)

example : New-PSSession –ComputerName mydpmserver.mydomain.com

Second, lets use Invoke-Command to import the module (we are going to add the DPM Snapin)

2. invoke-Command -ScriptBlock {add-pssnapin Microsoft.DataProtectionManager.PowerShell}  -Session (Get-PSSession –ComputerName <FQDN of DPM Server>)

Third, we are going to import these commands using Import-PSSession (you can add a prefix here using –prefix to identify them in a unique way)

3. Import-PSSession -Session (Get-PSSession -ComputerName <FQDN of DPM Server>) -module Microsoft.DataProtectionManager.PowerShell

Fourth, you can run Get-Command to confirm this (filtered by DPM)

4. Get-Command *DPM*

Cleaned up transcript and copied into a word file for ease here

 

For those of who read my previous post, you would have noticed the attach-productionserver.ps1 command. If you are really observant you would have noticed that it and a few others are not here.

So, lets try to get a workaround for that.

It is still a work in progress, however i am using Enter-PSSession for now

1. Enter-PSSession –ComputerName <FQDN of DPM Server>

2. Navigate to the DPM Bin Folder

   cd ‘C:\Program Files\Microsoft DPM\DPM\bin’

3. You will now see that the attach- commands are available

4. When done, use Exit-PSSession

Cleaned up transcript and copied into a word file for ease here

 

I recommend you follow Don Jones, author of the above mentioned book and PowerShell MVP

Hope you find this helpful and as interesting as I did.

 

Follow me

facebook-small322 twitter-small322

Have you ever been in a situation where you have either removed or added a new DPM server to your environment?

It happened to me just the other day, I had to “re-think” my DPM design and starting using “Local” to each Data Centre DPM servers to backup my data at each Data Centre. However, this was not the case before this, we were using the same product, but a different strategy. Now I had DPM agents in both datacentres connecting to DPM servers not in the same Data Centre. For Example, I had Server A (Data Centre 1) with a DPM agent from my secondary DPM Server (Data Centre 2) protecting it. So, I went searching and found my answer and it turned out to be amazingly simple thanks to POWERSHELL. DPM has a POWERSHELL management shell (thank goodness) and some built-in scripts for just this (truly amazing). Within 10 minutes I had changed my DPM agents to report to the DPM Servers and began creating protection as needed like SharePoint (see previous post).

To be safe, these are the steps I followed.

1. Remove old agent

2. Install new agent using CMD prompt

3. Ran attach-productionserver.ps1 to re-allocate to new server.

All steps are nicely listed on Microsoft Technet

This was really easy and well worth the investment in time.

On a side, was also made aware of a DPM Hotfix Rollup Package

 

Hopefully this helps someone else as well.

 

Follow me

facebook-small3 twitter-small3

I have finally found some time to look some more into DPM and decided to modify my environment and created some additional PROTECTION GROUPS. I am particularly chuffed as I have not done this before. Make no error, I have used DPM extensively for mailbox recoveries (Execs and other users crying about loosing items), recovering of databases and VHD (see some of my previous posts). So back to my point, the Protection groups were created without any hassle and now I have a dedicated SharePoint Protection Group.

See below, an extract from a script from Scripting Repository, many thanks to it’s author

http://gallery.technet.microsoft.com/scriptcenter/1c9c61ce-688f-4ef0-8d9b-cd93cd703c45

image

I did however run into a few hiccups and have learnt a few amount Smile

There are a few pre-reqs that are needed before the Sharepoint Protection Group can be created.

ConfigureSharePoint.exe must be run on the server were WSS / MOSS is located.

http://technet.microsoft.com/en-us/library/dd441708.aspx

The SharePoint VSS writer must be started and the SQL VSS Writer must be started.

Then, if like me, you had protected the SQL databases separately, these WSS / MOSS databases will need to be removed from the Protection Group.

Then a few pieces are added, see screenshot below.

image

It does not look like much, however if you look at the “Recovery Options”, it will look a little more familiar with a few more familiar databases.

image

Hopefully this helps you

 

Follow me

facebook-small twitter-small

The “crisis” week

Posted: May 3, 2011 in Technology
Tags: , ,

Hi All,

The last two weeks have been a little nutty for me. I have however, learnt to appreciate a few more things in life.

1. No matter how good your planning for DR, there is always that one thing that catches you. We have a generator, which is great Smile. Now, when we cutover from generator power to mains power and then the main building power trips, life becomes interesting. It is especially interesting when you have a UPS and it takes the load after your building has tripped. So now your enclosure is running on UPS power and then the UPS fails Confused smile

2. DPM has once again proved itself to me. I was able to restore and recover the VHD and get my Cluster up and running again with NUMEROUS VMs.

3. I am sure that everyone knows this, but DAMN, a hard shutdown (see point 1) of a cluster hurts. Thanks goodness our SAN was not hurt as well. The correct RAID config which allows for 3 failed drives. Especially when you loose 1 drive due to the shutdown.

4. SCVMM does not really like a hard shutdown of a cluster (see point 1 again) and machines being in a “saved”, for us, this was especially tricky.

More to come on SCSM 2010, now starting to play with Get-SCSMObject with smlets and get-scsmobject, the SCSM Engineering Team Blog is a fantastic resources and many thanks go out to the people who run and maintain this site, it is a gold mine.

Related sites,

http://www.scsm.se/

http://blog.scsmfaq.ch/

http://www.scsm.se/

A few great people to follow on twitter, all of them (that I know of, still finding more al the time), are a fountain of knowledge.

radtravis

syscencentral

JR52MAR

“EMBRACE YOUR INNER GEEK AND

ROCK ON”