NetBackup provides a pretty nice Web Interface, OpsCenter, to monitor and check the basic configuration. However after working a while with it, you may find that some information can be quit boring to find out.
Good news! Symantec didn’t forget that in Unix World some peoples still like working in command lines…
Once connected through SSH on your NetBackup server, you will have access to a bunch of usefull tools to work with your media manager. Unfortunately, while searching for them and some examples on Internet, I didn’t find a lot of articles on that topic.
Therefore the idea here is to give you a short summary of the most popular ones.
All these tools are mainly located under 2 folders (and their relative subfolders):
- …/openv/netbackup/bin/
- …/openv/volmgr/bin
The full path depends of course of your NetBackup installation.
Media monitoring and operations
First of all, let’s check the global status: vmoprcmd (in ./openv/volmgr/bin)
vmdbitest:/usr/openv/volmgr/bin # ./vmoprcmd HOST STATUS Host Name Version Host Status ========================================= ======= =========== vmdbitest 700000 ACTIVE PENDING REQUESTS DRIVE STATUS Drive Name Label Ready RecMID ExtMID Wr.Enbl. Type Host DrivePath Status ============================================================================= HP.ULTRIUM5-SCSI.050 Yes Yes MED005 Yes hcart3 vmdbitest /dev/nst0 AVR
In addition, the options -activate_host and -deactivate_host can be used to activate or deactivate an host.
For complete information on vmoprcmd, use vmoprcmd -help
Then you can then check the properties for a media: vmquery (in ./openv/volmgr/bin)
vmquery -m MED002 ============================================================ media ID: MED002 media type: 1/2" cartridge tape 3 (24) barcode: -------- media description: Media number 002 volume pool: NetBackup (1) robot type: NONE - Not Robotic (0) volume group: --- vault name: --- vault sent date: --- vault return date: --- vault slot: --- vault session id: --- vault container id: - created: Tue Aug 10 11:43:01 2010 assigned: Mon Aug 23 18:00:01 2010 last mounted: Mon Nov 29 18:00:06 2010 first mount: Wed Aug 11 10:01:22 2010 expiration date: --- number of mounts: 16 max mounts allowed: --- status: 0x0
Using bpmedialist (in ./openv/netbackup/bin/admincmd), you can have an overview of your ACTIVE medias
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpmedialist -U Server Host = vmdbitest id rl images allocated last updated density kbytes restores vimages expiration last read <------- STATUS -------> -------------------------------------------------------------------------------- MED002 1 26 12/10/2010 18:00 12/10/2010 21:50 hcart3 364089280 0 26 12/24/2010 21:50 N/A MED003 1 27 12/17/2010 18:00 12/17/2010 21:51 hcart3 344174432 0 27 12/31/2010 21:51 N/A MED001 1 27 12/20/2010 18:00 12/20/2010 21:54 hcart3 345551584 0 27 01/03/2011 21:54 N/A MED004 1 56 11/29/2010 20:34 12/13/2010 21:54 hcart3 703615360 0 32 12/27/2010 21:54 N/A MED005 1 51 11/25/2010 18:00 12/09/2010 21:52 hcart3 714567840 0 51 12/23/2010 21:52 N/A MED006 1 26 12/16/2010 18:00 12/16/2010 21:51 hcart3 345775808 0 26 12/30/2010 21:51 N/A MED007 1 52 12/07/2010 18:00 12/21/2010 21:53 hcart3 706256672 0 52 01/04/2011 21:53 N/A
Another cool tool about media usage is available_media (in ./openv/netbackup/bin/goodies)
vmdbitest:/usr/openv/netbackup/bin/goodies # ./available_media media media robot robot robot side/ ret size status ID type type # slot face level KBytes ---------------------------------------------------------------------------- CatalogBackup pool DataStore pool NetBackup pool MED002 HCART3 NONE - - - 1 364089280 ACTIVE MED003 HCART3 NONE - - - 1 344174432 ACTIVE MED001 HCART3 NONE - - - 1 345551584 ACTIVE MED004 HCART3 NONE - - - 1 703615360 ACTIVE MED005 HCART3 NONE - - - 1 714567840 ACTIVE MED006 HCART3 NONE - - - 1 345775808 ACTIVE MED007 HCART3 NONE - - - 1 706256672 ACTIVE MED008 HCART3 NONE - - - - - AVAILABLE MED009 HCART3 NONE - - - - - AVAILABLE MED010 HCART3 NONE - - - 1 2545523200 FULL
If like in my example you have a FULL media, it is possible to purge it manually: bpexpdate (in ./openv/netbackup/bin/admincmd)
bpexpdate -m MED003 -d 0
Of course a confirmation for the complete tape deletion is asked.
Configuration checkup
Beside the media management, the NetBackup command lines tools can also help to check the configuration.
Start by looking to the basic server information, like version or OS type: bpgetconfig (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpgetconfig -s vmdbitest -L Client/Master = Master NetBackup Client Platform = Linux, SuSE2.6.16 NetBackup Client Protocol Level = 7.0.0 Product = NetBackup Version Name = 7.0 Version Number = 700000 NetBackup Installation Path = /usr/openv/netbackup/bin Client OS/Release = Linux 2.6.27.19-5-default
You can also get the complete settings, including CIPHER information using:
./bpgetconfig -s vmdbitest -A -L
Instead of checking the server, you can also have a look to the complete user configuration
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpgetconfig -u SERVER = vmdbitest KNOWN_MASTER MASTER_OF_MASTERS USEMAIL = [email protected] BPBACKUP_POLICY = any BPBACKUP_SCHED = any ... ... PERFORM_CONSISTENCY_CHECK = YES CONTINUE_BACKUP_ON_FAILURE = YES DDNS_RANGE FAST_CONFIGURED_CLIENT = YES ORACLE_METADATA = NO KEEP_DBM_IMAGECHANGELOG_DAYS = 7
Some other configuration information are available about policies and schedules.
You can for instance check the existing policies: bppllist (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bppllist -U Policy: LinuxFullBackup Policy: OracleDBTEST Policy: OracleOMS Policy: Test
Once you got the list, you can check the setting for a single policy: bpplinfo (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpplinfo OracleDBTEST -U Policy Type: Oracle Active: yes Effective: 02/03/2008 20:26:56 Follow NFS Mounts: no Cross Mount Points: no Client Compress: no Collect TIR info: no Policy Priority: 0 Ext Security Info: no File Restore Raw: no Client Encrypt: no Residence: - Volume Pool: NetBackup Server Group: *ANY* Data Classification: - Residence is storage lifecycle policy: no Granular Restore: no Ignore Client Direct: no
Finally for each policy, the corresponding schedules can be displayed: bpplsched (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpplsched OracleDBTEST -L Schedule: Default-Application-Backup Type: UBAK Obak (2) Frequency: 7 day(s) (604800 seconds) Retention Level: 1 (2 weeks) u-wind/o/d: 0 0 Incr Type: DELTA (0) Alt Read Host: (none defined) Max Frag Size: 0 MB PFI Recovery: 0 Maximum MPX: 1 Number Copies: 1 Fail on Error: 0 Residence: (specific storage unit not required) Volume Pool: (same as policy volume pool) Server Group: (same as specified for policy) Residence is Storage Lifecycle Policy: 0 Daily Windows: Day Open Close W-Open W-Close Sunday 000:00:00 024:00:00 000:00:00 024:00:00 Monday 000:00:00 024:00:00 024:00:00 048:00:00 Tuesday 000:00:00 024:00:00 048:00:00 072:00:00 Wednesday 000:00:00 024:00:00 072:00:00 096:00:00 Thursday 000:00:00 024:00:00 096:00:00 120:00:00 Friday 000:00:00 024:00:00 120:00:00 144:00:00 Saturday 000:00:00 024:00:00 144:00:00 168:00:00
Backup and Jobs information
The last part is about looking the jobs information and the backup data
Get the job list: bpdbjobs (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpdbjobs JobID Type State Status Policy Schedule Client Dest Media Svr Active PID FATPipe 3360 Image Delete Done 1 22691 3305 Backup Done 0 OracleOMS Default-Application-Backup vmdbioem vmdbitest 14159 No 3304 Backup Done 0 OracleDBTEST CallRMANScript vmdbioem vmdbitest 14077 No 3298 Backup Done 0 LinuxFullBackup AllWorkingNights vmdbiora1 vmdbitest 4640 No 3294 Image Delete Done 1 1770
This is quite interresting, especially for following the running or pending jobs. In addition is you are facing some issue with a job, bperror may help to find out what happened.
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bperror -U12/22/2010 09:54:17 vmdbitest - Hot catalog backup is not configured for
'vmdbitest', catalog cleanup will return partial success until hot catalog backup is configured.
About backups, it is possible browse all the images on a media: bpimmedia (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpimmedia -mediaid MED001 -U -------------------------------------------------------------------------------- Backup-ID: vmdbioem_1292875215 Policy: OracleOMS Schedule Type: UBAK Retention Level 1 Number of Files: 1 Compression: Y Encryption: N Image Type: Regular Primary Copy: 1 Expires: 21:00 01/03/2011 Copy Number: 1 Fragment Number: 1 Fragment Size (KB): 371168 Media Type: RMed Density: hcart3 File Number: 5 Offset: 3839839 Host: vmdbitest Device Written On: 0 MPX: N Expires: 21:00 01/03/2011 Retention Level: 1 MediaID: MED001 -------------------------------------------------------------------------------- Backup-ID: vmdbioem_1292868896 Policy: LinuxFullBackup Schedule Type: FULL Retention Level 1 Number of Files: 155096 Compression: N Encryption: N Image Type: Regular Primary Copy: 1 Expires: 19:14 01/03/2011 Copy Number: 1 Fragment Number: 1 Fragment Size (KB): 32617408 Media Type: RMed Density: hcart3 File Number: 4 Offset: 3330190 Host: vmdbitest Device Written On: 0 MPX: N Expires: 19:14 01/03/2011 Retention Level: 1 MediaID: MED001
Like often, it is possible to have a global view about the backups: bpcatlist (in ./openv/netbackup/bin/admincmd)
vmdbitest:/usr/openv/netbackup/bin/admincmd # ./bpcatlist -server vmdbitest Backupid Backup Date Files Size Sched Policy Catarcid S C Files file vmdbioem_1292955439 Dec 21 19:17:19 2010 155053 31.0G AllWorkingNights LinuxFullBackup 0 1 0 LinuxFullBackup_1292955439_FULL.f vmdbioem_1292878209 Dec 20 21:50:09 2010 1 384k Default-Application-Backup OracleOMS 0 1 0 OracleOMS_1292878209_UBAK.f vmdbioem_1292877956 Dec 20 21:45:56 2010 1 180.0M Default-Application-Backup OracleOMS 0 1 0 OracleOMS_1292877956_UBAK.f vmdbioem_1292877918 Dec 20 21:45:18 2010 1 130.0M Default-Application-Backup OracleOMS 0 1 0 OracleOMS_1292877918_UBAK.f vmdbioem_1292877879 Dec 20 21:44:39 2010 1 186.0M Default-Application-Backup OracleOMS 0 1 0 OracleOMS_1292877879_UBAK.f vmdbioem_1292877836 Dec 20 21:43:56 2010 1 185.0M Default-Application-Backup OracleOMS 0 1 0 OracleOMS_1292877836_UBAK.f ... ...
And so we reached the end of this small topic. Remember that this list is definitively not exhaustive.
I hope that it helped to make your life with NetBackup easier. 🙄
Enjoy! 😀