Recovering data from expired tape on DPM 2012

System Center Data Protection Manager (DPM) allows you to configure a retention period when doing tape backups.

This is the date until when this tape will be considered “valid” and won’t be overwritten.

After this date you won’t be able to recover backups from this tape* and in the case this tape is put in a drive from the tape library it may be overwritten.

*it is possible to recover data from this tape using this procedure, but those backups will be recognized as being from an external source and procedures in DPM’s GUI may not work.

The problem is when you make a backup with the wrong retention period or, for some reason, you want to change the expiration date from a tape. You will notice there is no way to do this using DPM’s GUI.

Even worse, you may have an important tape that is expired and you need to recover data from one of its backup but it won’t be available.

After doing a lot of research on the web, joining pieces of information and code from here and there I have managed to write a script that updates the needed fields about an expired tape on DPM’s database, making it available again!

I must remember that this procedure IS NOT SUPPORTED by Microsoft and you should do this by your own risk, since it may cause unexpected impacts on your DPM server.

You should only do this procedure if you are absolutely sure about what you are doing and its possible impacts!

Here is the script with a few explanations:

USE DPMDB

GO

UPDATE tbl_MM_ArchiveMedia
SET
DatasetsState = 2,
IsOmidChangeNeeded = 0
FROM dbo.tbl_MM_Media AS Media
INNER JOIN dbo.tbl_MM_ArchiveMedia AS ArchiveMedia ON ArchiveMedia.MediaId = Media.MediaId
WHERE Media.Label = ‘Your_Tape_Label’
UPDATE tbl_MM_PhysicalDataset
SET
LifeStatus = 1,
ExpiryDate = dateadd(yy,1,Dataset.ExpiryDate)
FROM dbo.tbl_MM_Media AS Media INNER JOIN
dbo.tbl_MM_ArchiveMedia AS ArchiveMedia ON ArchiveMedia.MediaId = Media.MediaId
INNER JOIN dbo.tbl_MM_MediaMap AS MediaMap ON MediaMap.MediaId = ArchiveMedia.MediaId
INNER JOIN dbo.tbl_MM_PhysicalDataset AS Dataset ON Dataset.DatasetId = MediaMap.DatasetId
WHERE Media.Label = ‘Your_Tape_Label’

Explanations about table’s fields:

–tbl_MM_ArchiveMedia

  • DatasetsState: 2 = not expired/reclaimed, 3 = expired
  • IsOmidChangeNeeded: 0 = NO / 1 = YES

–tbl_MM_PhysicalDataset

  • LifeStatus: 1 = Created, 2 = Expired
  • ExpiryDate = Expiration Date

Source for this article:

I hope this script helps you all! In the case you have some suggestion or concern about this script please leave a comment!

Esse post foi publicado em Artigos, backup, System Center. Bookmark o link permanente.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s