How to Determine the Number of Images in the NetBackup Catalog

How to Determine the Number of Images in the NetBackup Catalog

Article: 100038735
Last Published: 2016-07-15
Ratings: 1 0
Product(s): NetBackup

Description

How to determine the number of images in the NetBackup catalog using the command prompt or CLI.

Summary:
This is a brief overview of how to use bpimmedia via the command prompt in Windows or CLI in Linux to determine the sum of images contained in the NetBackup catalog. This is useful for purposes of upgrading NetBackup services.

Windows Procedure:
On a Windows Master Server, change directory (cd) to <install-path>\netbackup\bin\

Type the following command:
bpimmedia | find /i "FULL" /c

This accounts for the number of Full backups. If you replace full with each of the backup types shown below, you can calculate the total.
- FULL  = Full backups
- USER = User based backups such as DB types
- CINC  = Cumulative backups
- INCR  = Differential backups

*** This is based on schedules naming. You may replace the schedule name with a wildcard " * ".

Linux Procedure:
On a Linux Master Server, open a Putty session and change directory (cd) to <install-path>/netbackup/bin/admincmd/

Type the following command:
./bpimmedia | grep -a FULL | wc -l

This accounts for the number of Full backups. If you replace full with each of the backup types shown below, you can calculate the total.
- FULL  = Full backups
- USER = User based backups such as DB types
- CINC  = Cumulative backups
- INCR  = Differential backups

Basic Command: 
./bpimmedia | grep -i FULL | wc -l

User-added image

Extended Command:  
The following command is subject to schedule naming conventions. It is intended to demonstrate how this command can be extended to produce similar output as seen in the NetBackup GUI.   

[root@nbmaster2 admincmd]# printf "There are $(./bpimmedia |grep -i FULL |wc -l) Full Images.\nThere are $(./bpimmedia |grep -i DIF |wc -l) Differential Images.\nThere are $(./bpimmedia |grep -i CINC |wc -l) Cumulative Images.\nThere are $(./bpimmedia |wc -l) images referenced which include fragments in the Disk Pool.\nThere is a total of $(./nbstlutil list |grep C | wc -l) images in the NetBackup Catalog.\n"

Command returns:
There are 2 Full Images
There are 1 Differential Images
There are 1 Cumulative Images
There are 8 images referenced which include fragments in the Disk Pool. 
There is a total of 4 images in the NetBackup Catalog.

User-added image

Watch the Video Demonstration:
The following video demonstrates the extended command in operation. 


 

Was this content helpful?