cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

How to get rid of thousands of OST-Media as a result of BE2010 DeDuplication Store Problems

FischerRoman
Level 3
Partner
If you ever tried to move thousands of media to media set "Retired Media" and/or tried to delete the same number of media using the Backup Exec 2010 Console and thought, if there is some script doing this - this could be the answer to your question..

Yesterday I got reply from Symantec Support stating that there is no tool available yet to do this automatically.
I asked for such a tool after we had more than 12000 "dead media" or better said "Unknown Media" in the DeDuplication Store after it stopped working and started to create 100 new "Unknown" media every few minutes...

The DeDup Store is history since then, as our customer didn't want to live without working backups any longer (after 2 days of no working backups) and Symantec Support was unable to fix the issue in time (or even give us a call in time to try to fix it, but that's another story I don't want to discuss).


I just made some small script to..
  1. move all OST-* Media from any Media Set (its name must be known, look into the BE Console) to media set "Retired Media"
  2. delete all OST-* Media out from media set "Retired Media"

PREPARATION:
  1. Delete the DeDuplication Store from Backup Exec Console (&Retarget all Jobs to another Backup Device) if you want to completely remove all DeDup Store remains afterwards.
  2. Otherwise just move all media where "Media Description" == "Unknown Media" to media set "Retired Media" manually using the BE2010 Console. This cannot be done automatically, as I didn't find a way to use BEMCMD to move media based on their "Media Description" to some other media set. If you plan to do this and not to move ALL DeDup OST-* Media to Retired Media just skip down to step <Delete all OST* Media from "Retired Media"> afterwards.
  3. Open a CMD Command Prompt in <C:\Program Files\Symantec\Backup Exec>, where "BEMCMD.EXE" resides.

USAGE:
Copy each line in correct order and paste it into the command prompt.

IMPORTANT:
If you like to save these commands into scripts like "MoveMedia.cmd" or "DeleteMedia.cmd", you have to change all "%G" to "%%G", otherwise the scripts won't work.


Move all OST* Media to "Retired Media" so they can be deleted afterwards:
  1. bemcmd -o132 -j"INSERT_NAME_OF_SOURCE_MEDIASET" | find "MEDIA LABEL: OST" > OST_MEDIA.TXT
  2. FOR /F "tokens=3 delims=: " %G in (OST_MEDIA.TXT) DO BEMCMD -o130 -j%G -mn:"Retired Media"
If you try to delete any media without first moving it to media set "Retired Media", you will get this error: "You must move the media to the Retired Media set before you can delete it".

Delete all OST* Media from "Retired Media":
  1. BEMCMD -o132 -j"Retired Media" |find "MEDIA LABEL: OST" > OST_MEDIA.TXT
  2. FOR /F "tokens=3 delims=: " %G in (OST_MEDIA.TXT) DO BEMCMD -o129 -m%G

WARNING:
The BEMCMD Command Line Tool doesn't support any wildcards with parameters "-o132", "-o130" or "-o129" - so every BEMCMD command will be fired up with only one media at a time.
THIS WILL TAKE SOME TIME!!
In my environment it took about 3.5 seconds for each BEMCMD command, so this calculates up to about 1 hour per 1000 media - each for the "move step" and "delete step".


Your alternative way to clean up everything...
...is to do some silly Monkey-work (or Sisyphos work as I like to call it) and do everything manually from the Backup Exec Console.
Symantec Support told us to select a maximum of 100 media a time and then move them to media set "Retired Media" and afterwards also only select a maximum of 100 media from there and delete them.
I found out that it is possible to select roughly 300 media at a time when moving or deleting them from a media set, as I didn't want to sit any longer for hours selecting 100 media, do something with them and then wait for 2 minutes to complete this step - just to repeat this procedure for another 100 media....

Doing the same with 300 media at a time took 6 minutes to complete, so 10x monkey work per hour and not 30x monkey work per hour.. Better, but not perfect.



Since our last DeDup errors occurred, we had roughly 12700 media left in retired media - I moved them manually but didn't delete them, because I don't like monkey work.
Now I'm going to delete them using the second script, I tried it out with ~100 media and it works. I also moved ~100 media out of "Retired Media" to some other media set and moved them to "Retired Media" with the first script, it works too.

But again be warned - the script will take some time to complete, as BEMCMD produces some load on the BackupExec SQL-Server instance each time it does something.


For other language installations you have to change "Retired Media" to the correct media set name and also install Hotfix 344584 http://support.veritas.com/docs/344584 first - otherwise you get an error (here some more information: http://seer.entsupport.symantec.com/docs/340022.htm ).


Last warning - this information is provided "as is" - without any warranty or something like that!
I'm not responsible for any unwanted deletion of OST-* media, as it is all at YOUR fingertips doing something with BEMCMD.



Maybe it's useful for some of your Backup Exec Warriors, feel free to use and/or modify it.
If you have any comments, please don't hesitate to write them down!

Roman
1 REPLY 1

Gurvinder
Moderator
Moderator
Employee Accredited Certified

Please Install this latest dedupe fix www.symantec.com/docs/TECH145462 There is one more in the making. You can check with support on that