Video Screencast Help

Netbackup Automation Question

Created: 31 Dec 2012 • Updated: 17 Jan 2013 | 3 comments
This issue has been solved. See solution.

Hi everyone,

I've been trying to automate what is easily the most tedius part of my job: image duplication to tape.

Here's a little background about our environment (my apologies if this gets too long). If I leave anything pertinent out, please ask. We have a number of physical servers that we use NB to backup. Over the weekend, we have full backups of both servers and SQL databases for the entire physical server environment written to our SAN. There are three logical drives that exist purely for these images. Currently, every Tuesday morning, I open NB, navigate to the Catalog node and perform a query by setting the following:

- Action: Duplicate
- Disk Types: Basic Disk
- Media Server: <our media server>
- Path: E:\Fulls (one of the three logical drives on our SAN).
- Between: 12/28 (Friday) - And: 12/31: (Monday)
- Copies: Primary Copy
- Policy: All Policies
- Policy Type: All Policy Types
- Client: All Clients

This returns a list of about 660 images. I then go through the results, selecting the images in groups of 2-10 using Shift+Click, right click the selection, and then select Duplicate. I then, on the Setup Duplication Variables dialog box, configure the following:

- Storage Unit: <appropriate storage unit>
- Volume Pool: <appropriate volume pool>
- Retention: <2 weeks / Infinity> <-- depends on which week of the month.
- If This Copy Fails: Continue
- Media Owner: leave blank.

After I've done this for each image returned by the intial query, I run it two more times on the two additional SAN drives. As you can probably guess, this mind-numbing torture.

I've been working during various slow times (like now) to develop a script to automate this. Back in October, I thought I was successful, until I needed to restore a SQL database when lo-and-behold, that image was *NOT* saved off to tape!!! The only thing I can figure out is that the command I had used in my script to list the backups available for to-tape duplication was not including the SQL backups, just the server backups (does that make sense?).

The line I *believe* is giving me trouble is this one:

bpimagelist.exe -d $StartDate -e $EndDate -idonly -M chcbkpsvr02 -st FULL > C:\Scripts\Test\ExportedDupes_$Today.txt

... any ideas?

Comments 3 CommentsJump to latest comment

RamNagalla's picture


as you are saying ita basic disk.. why dont you use disk staging storage unit option to duplicate your data to tape..

it will take care about all your tasks that you are doing maunally.. (duplications., retenction on tape, expiring the images,climing the space on disk..)

just gothough below to T/N

hope this helps..

Will Restore's picture

SQL duplications need 'Application Backup' schedules as well

  -st UBAK

Will Restore -- where there is a Will there is a way

Chad&#039;sGallBladder's picture

Thanks for the comments, and sorry for the really long delay in answering. The Disk Staging feature looks nice, I'll be researching that for sure.

WR> Would I then add this line in order to grab those backups:

bpimagelist.exe -d $StartDate -e $EndDate -idonly -M chcbkpsvr02 -st "Application Backup" > C:\Scripts\Test\ExportedDupes_$Today.txt

EDIT: Ok, I'm really, really dense. I just picked up that the UBAK was the value to place after the -st switch, so that the code would look like this:

bpimagelist.exe -d $StartDate -e $EndDate -idonly -M chcbkpsvr02 -st UBAK > C:\Scripts\Test\ExportedDupes_$Today.txt