cancel
Showing results for 
Search instead for 
Did you mean: 

Script to suspend media

js88699
Level 5
Partner

Reference: https://www-secure.symantec.com/connect/pt-br/forums/script-freezing-media

I have a situation simular to this I'd like some direction or help on.  I have multiple policies that we run to "archive" (not an archive in NBU terms, just a backup with a long retention) some monthly data.  Does anyone have a sample of a post backup script that I could use to suspend the tapes used for that job after the backup has run.  Currently I'm doing it manually, and as humans go, I've forgotten to do it and ended up with two months of data on the same tapes (bad for me).

If digging the data out using bpimagelist is the best bet, I can work through that.  I was hoping there are variables available to a post script that might make this easier.  Again only looking for the tape(s) just used.

Thanks  John

3 REPLIES 3

Dipendra_Singh
Level 4

Hey JS,

You can try this script bpend_notify , though I haven't tested it but I am sure it will work, just rename it and save by the name bpend_notify.policy (policy name for which you want it to run) and add the bpmedia -suspend command to it. As the backup for that particular policy will complete, it must run the suspend command in the bpend script and will suspend the media used by that policy. Please test it and let me know whether it worked or not.

js88699
Level 5
Partner

I'm familiar with that script, although it does not get the list of mediaID used.  That's my problem.

# This script:
#       receives 5 parameters: CLIENTNAME POLICYNAME SCHEDNAME SCHEDTYPE STATUS
#       must be executable by the root user
#       should exit with 0 upon successful completion
#

That is directly from the script.  I need to be able to get a list of the media used for for just THIS ONE backup job and suspend those.  If I spend enough time, I'm sure I could eventually come up with th code to do this.  I was hoping someone else out here alrready had something like this I could "borrow".

Michael_G_Ander
Level 6
Certified

Think something like bpimagelist -media -client  and the relevant mediaid piped into bpmedia -suspend -m <mediaied> or you could use vault if you have license for that

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue