Forum Discussion

DPeaco's avatar
DPeaco
Moderator
11 years ago
Solved

Dumping NBU Catalog Info....

I am needing a way to dump the Netbackup 7.1x catalog off to a CSV flat file so that it can be imported into an Oracle table for later reference.

The master backup server is slated to retire very soon and I want to keep all the info of the current catalog so that it can be referenced for historical data recovery for long retention backups. This is requested so that we won't need to merge 2 different catalogs on 2 different master backup servers.

I used to work a lot with Backup Express and it was fairly easy to dump the entire catalog out to a flat ascii file that could be referenced via grep or bringing that info into an Excel spreadsheet, or even bringing that info into an Oracle table for reference.

Just thinking it would be really nice to be able to dump the NBU catalog and have the media id, backup client name, expiration date, and a list of files to pick from....kind of like a brute force way of looking things up in the NBU GUI via the catalog.

Thoughts? Suggestions? Ideas?

  • Opps, me bing blind again ...  you have NBU 7.1 so you don't need it.

    In ...

    /usr/open/netbackup/db/images/<client>/<time>/ dir contains multiple files ...

    <policy_name>_<ctime>.<backup_level>

    <policy_name>_<ctime>.<backup_level>.f

    catstore (dir)

    The first file is the header, effectively what would have been 'created' by cat_export

    The .f file is a binary that contains the list of files in the backup, + TIR info if used

    catstore dir contains info of the files in the backup if the catalog info for the backup is above a certain size.

    Saving everything in /usr/openv/netbackup/db/images preserves that catalog information for the environment.

    Saving output of bpimagelist may also be useful.

     

  • Easiest way is to run cat_export -a - this dumps the 'header' files out into /usr/open/netbackup/db.export

    Dumping into Excel is going to be difficult ...  

    Other option is to dump the NBDB using nbdb_unload <some-dir> - though in the raw format this  will be difficult to find things.  The reload.sql file details to contents (and names) of eaach DB table.

    You'll also need a copy of /usr/openv/netbackup/db/images

    The .f files can be read by moving this dir structure to a NBU master and running cat_convert -dump on the .f file.  Obviously, don't move this to the original path, put it under a specific sub-dir.

  • I'm not finding a cat_export anywhere on the Linux box. The .f file appears to not contain the media id, but the other associated file does have the media id in it as well as the backup id.

  • Look at HOWTO72929 as it has the directions of use for cat_export. The -all switch exports the catalog image data of all the clients of the master server. 

    HOWTO86584 contains more infomation about the NetBackup image database files

  • That's all fine, well, and good...but I don't see cat_export anywhere.

     

    -r-xr-xr-x   1 root daemon     4750 Jun 12  2011 bpvxver
    -rw-------   1 root root         16 May 28 00:00 catbackup.lock
    -r-xr-xr-x   1 root daemon  3909314 Feb  3  2011 cat_convert
    -r-xr-xr-x   1 root daemon  3906023 Feb  3  2011 cat_downgrade
    -rw-------   1 root root         17 May 28 15:54 cleanup.lock
    -rw-------   1 root root         17 May 28 15:55 cleanup.lock2
    drwxr-xr-x   4 root daemon     4096 Feb  3  2011 cluster
    -r-xr-xr-x   1 root daemon     7402 Jun 12  2011 db2_config

     

    Maybe I'm missing something?

  • Opps, me bing blind again ...  you have NBU 7.1 so you don't need it.

    In ...

    /usr/open/netbackup/db/images/<client>/<time>/ dir contains multiple files ...

    <policy_name>_<ctime>.<backup_level>

    <policy_name>_<ctime>.<backup_level>.f

    catstore (dir)

    The first file is the header, effectively what would have been 'created' by cat_export

    The .f file is a binary that contains the list of files in the backup, + TIR info if used

    catstore dir contains info of the files in the backup if the catalog info for the backup is above a certain size.

    Saving everything in /usr/openv/netbackup/db/images preserves that catalog information for the environment.

    Saving output of bpimagelist may also be useful.

     

  • The header file (<policy_name>_<ctime>.<backup_level>) is a text file that contains the backup id and media id.