User Tools

Site Tools


apps:netbackup:cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apps:netbackup:cli [2015-09-14 22:12] rootapps:netbackup:cli [2016-07-05 22:53] (current) root
Line 35: Line 35:
 * If the storage unit is a robot with empty slots, add more volumes (remember to specify the correct volume pool). * If the storage unit is a robot with empty slots, add more volumes (remember to specify the correct volume pool).
 * If there are no empty slots, move some media to nonrobotic and then add new volumes. * If there are no empty slots, move some media to nonrobotic and then add new volumes.
-* If you have difficulty keeping track of your available volumes, try the available_media script: +...
-On UNIX, this script is in: +
-/usr/openv/netbackup/bin/goodies/available_media +
-On Windows, the script is in: +
-install_path\NetBackup\bin\goodies\available_media.cm +
-+
-This script lists all volumes in the volume configuration, and augments that list with information on the volumes currently assigned to NetBackup. +
-* Set up a scratch volume pool as a reserve of unassigned tapesIf NetBackup needs a new tape and none are available in the current volume pool, it does the following: Moves a tape from the scratch pool into the volume pool that the backup uses. +
-* If the storage unit and volume pool appear to have media, verify the following: +
-* Volume is not FROZEN or SUSPENDED. +
-Check for this condition by using the NetBackup Media List report. If the volume is frozen or suspended, use the bpmedia command to unfreeze or unsuspend it (if that is wanted). +
-* Volume has not expired or exceeded its maximum number of mounts. +
-* The EMM database host name for the device is correct. +
-If you change the EMM database host name, stop and restart the following: The Media Manager device daemon, ltid, (if the server is UNIX or Linux) or the NetBackup Device Manager service (if the server is a Windows system). +
-* The correct host is specified for the storage unit in the NetBackup configuration. +
-The host connection should be the server (master or media) with drives connected to it. +
-* The Media and Device Management volume configuration has media in the correct volume pool. Unassigned or active media is available at the required retention level. +
-Use the NetBackup Media List report to show the retention levels, volume pools, and status (active and so on) for all volumes. Use the NetBackup Media Summary report to check for active volumes at the correct retention levels. +
-* The NetBackup bptm process is rejected when it requests media from the vmd process (UNIX) or the NetBackup Volume Manager service (Windows). The cause of this problem is that the process or service cannot determine the name of the host that makes the request. +
-This error can be due to an incorrect network configuration that involves the following: +
-* Multiple network interfaces +
-* /etc/resolv.conf on those UNIX or Linux systems that use it +
-* Running DNS with reverse addressing not configured +
-* Create bptm and vmd debug log directories and retry the operation. +
-* Examine the bptm debug log to verify that bptm connects to the correct system. If an error is logged, examine the vmd log. +
-On UNIX, the vmd log is: +
-/usr/openv/volmgr/debug/daemon/log.xxxxxx +
-On Windows, the vmd log is: +
-install_path\Volmgr\debug\daemon\xxxxxx.log +
-* If this storage unit is new and this attempt to use it is the first, stop and restart NetBackup on the master server. +
-Note+
 The mds unified logging files (OID 143) usually show the NetBackup media selection process. The mds unified logging files (OID 143) usually show the NetBackup media selection process.
 More troubleshooting information in a wizard format is available for this status code. More troubleshooting information in a wizard format is available for this status code.
Line 92: Line 62:
 myNBClient1_1439708412  F_Full_on_ FULL  1   20969    N  R  1                  Sun Aug 30 09:00:12 2015 myNBClient1_1439708412  F_Full_on_ FULL  1   20969    N  R  1                  Sun Aug 30 09:00:12 2015
 </code>  </code> 
 +
 +==== Show Backed Up Files of a Client Since a Date ====
 +
 +<code>
 +# bplist -C myNBClient0 -s 01/21/2015 -R -b -l -k myBackupPolicy /tmp                                                                                                         
 +drwxr-xr-x root      root                0 Aug 08 04:25 /tmp
 +-rw-r--r-- root      root        49145860K Aug 08 04:25 /tmp/mydir/myfile1
 +-rw-r--r-- root      root              200 Aug 08 04:25 /tmp/mydir/myfile2
 +</code>
 +
 +==== Show Backed Up Files by BackupID ====
 +
 +<code>
 +# bpflist -client myNBClient0 -backupid myNBClient0_1421224742 -d 01/21/2015 -rl 999 -pattern /tmp
 +FILES 10 0          0 1421224742 0 myNBClient0 myBackupPolicy myNBClient0_1421224742 - *NULL* 19 0 unknown unknown 0 0 *NULL*
 +5 0 37 52 138876830 1 0 0 64774 /tmp/mydir/myfile1 33188 root root 200 1421161365 1421161365 1421183429
 +6 0 38 54 138876834 1 0 0 64774 /tmp/mydir/myfile2 33188 root root 10465 1421161365 1421161365 1421183429
 +</code>
 +
 +==== Show Retention Levels with According Time ====
 +
 +<code>
 +# bpretlevel -l
 +0 604800 1 week
 +1 1209600 2 weeks
 +2 1814400 3 weeks
 +3 2678400 1 month
 +4 5356800 2 months
 +5 8035200 3 months
 +6 16070400 6 months
 +7 24105600 9 months
 +8 31536000 1 year
 +9 2147483647 infinite
 +...
 +24 2147483647 infinite
 +</code>
 +
 +
 +==== Get a Client-Policy List ====
 +
 +<code>
 +# bppllist -allpolicies | awk '/^CLASS/{ current_policy=$2 } /^CLIENT/{ print $2,current_policy }' | sort
 +myClient00 myPolicy00
 +myClient00 myPolicy01
 +myClient01 myPolicy00
 +myClient03 myPolicy01
 +</code>
 +
 +==== Tape Usage ====
 +
 +Get approximate numbers about tape usage of a library.
 +
 +<code>
 +# bpmedialist -l | awk 'BEGIN{sum=0;tcount=0;} { if($12!=9 && $11!=0){sum+=$9; tcount++;} } END { print "total capacity:",sum/1024/1024/1024, "TB"; prin count; pro_tape_GB=sum/tcount/1024/1024; print "average data per tape:",pro_tape_GB, "GB"; print "compression ratio:", pro_tape_GB/400 }'
 +total capacity: 370.917 TB
 +average data per tape: 566.05 GB
 +compression ratio: 1.41512
 +</code>
 +
 +pro_tape_GB/400: divided by 400 because of LTO3.
 +
 +==== Find by Pattern in Backups ====
 +
 +The following example searches for the pattern *tmp* in all files and directories which are backuped by FULL Schedules within the last two weeks.
 +
 +<code>
 +# nbfindfile -c myClient0 -p "*tmp*" -st FULL -s_ut $(($(truss /usr/bin/date 2>&1 | awk -F"=" '/^time/{print $2}' | tr -d ' ')-(60*60*24*14)))
 +==========================================================
 +Client      : myClient0
 +Policy      : myPolicy0
 +Backup Time : Sun Oct 25 09:00:09 2015 (1445760009)
 +Backup ID   : myClient0_1445760009
 +==========================================================
 +/var/adm/utmpx
 +/var/adm/wtmpx
 +/var/adm/wtmpx.0
 +/var/adm/wtmpx.1
 +/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/reloc/etc/default/utmpd
 +/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/reloc/var/adm/utmpx
 +/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/reloc/var/adm/wtmpx
 +/var/svc/log/system-rmtmpfiles:default.log
 +/var/svc/log/system-utmp:default.log
 +/var/svc/manifest/system/rmtmpfiles.xml
 +/var/svc/manifest/system/utmp.xml
 +/var/tmp/
 +==========================================================
 +Client      : myClient0
 +Policy      : myPolicy0
 +Backup Time : Sun Oct 25 09:00:07 2015 (1445760007)
 +Backup ID   : myClient0_1445760007
 +==========================================================
 +/export/home/asdf/.ssh/gtmp
 +</code>
 +
 +==== Manage exclude_list of UNIX/Linux clients from the server ====
 +
 +If there is a client like "myClient" and the exclude_list have to be edited but only access to the master server is available, then copy the exclude_list to the master server (local file may be called "myClient-exclude_list"):
 +
 +<code>
 +# bpgetconfig -e myClient-exclude_list myClient
 +</code>
 +
 +The copied file is a normal text file. Entries can be added or removed. This file can be sent back to the server:
 +
 +<code>
 +# bpsetconfig -e myClient-exclude_list -h myClient                                                                                                                                              
 +</code>
 +
 +
 +==== Search in all Backups of a Client ====
 +
 +=== Windows ===
 +
 +<code>
 +# nbfindfile -c myClient0 -only_files -p "*.mdf" -s_ut 0 -l -pt MS-Windows
 +
 +==========================================================
 +Client      : myClient0
 +Policy      : myWinPolicy
 +Backup Time : Thu 07 Jan 2016 12:21:20 AM CET (1452122480)
 +Backup ID   : myClient0_1452122480
 +==========================================================
 +-rwx------ root;Admi root;None     5636096 Dec 21 14:23:26 D:\SQLData\MSSQL12.ASDF01\MSSQL\DATA\master.mdf *
 +-rwx------ root;Admi root;None     4390912 Dec 21 14:23:26 D:\SQLData\MSSQL12.ASDF01\MSSQL\DATA\model.mdf *
 +-rwx------ root;Admi root;None    17956864 Dec 21 14:23:26 D:\SQLData\MSSQL12.ASDF01\MSSQL\DATA\MSDBData.mdf *
 +-rwx------ root;MSSQ root;MSSQ     8388608 Dec 21 14:23:51 D:\SQLData\MSSQL12.ASDF01\MSSQL\DATA\tempdb.mdf *
 +
 +==========================================================
 +Client      : myClient0
 +Policy      : myWinPolicy
 +Backup Time : Mon 28 Dec 2015 12:04:47 AM CET (1451257487)
 +Backup ID   : myClient0_1451257487
 +==========================================================
 +-rwx------ root;SYST root;SYST    41943040 Apr 20  2015 C:\Program Files\Microsoft SQL Server\MSSQL12.ASDF01\MSSQL\Binn\mssqlsystemresource.mdf *
 +-rwx------ root;SYST root;SYST     4194304 Feb 21  2014 C:\Program Files\Microsoft SQL Server\MSSQL12.ASDF01\MSSQL\Binn\Templates\master.mdf *
 +-rwx------ root;SYST root;SYST     2293760 Feb 21  2014 C:\Program Files\Microsoft SQL Server\MSSQL12.ASDF01\MSSQL\Binn\Templates\model.mdf *
 +-rwx------ root;SYST root;SYST    13434880 Feb 21  2014 C:\Program Files\Microsoft SQL Server\MSSQL12.ASDF01\MSSQL\Binn\Templates\msdbdata.mdf *
 +</code>
 +
 +=== Linux ===
 +
 +<code>
 +# nbfindfile -c myClient1 -only_files -p "system.sh" -s_ut 0 -l
 +
 +==========================================================
 +Client      : myClient1
 +Policy      : myStdPolicy
 +Backup Time : Mon 04 Jan 2016 11:01:43 PM CET (1451944903)
 +Backup ID   : myClient1_1451944903
 +==========================================================
 +-rwx------ root      root               63 Oct 14 15:47:47 /opt/asdf/system/system.sh *
 +
 +==========================================================
 +Client      : myClient1
 +Policy      : myStdPolicy
 +Backup Time : Thu 31 Dec 2015 07:06:14 PM CET (1451585174)
 +Backup ID   : myClient1_1451585174
 +==========================================================
 +-rwx------ root      root               63 Oct 14 15:47:47 /opt/asdf/system/system.sh *
 +</code>
 +
 +
 +==== Create a List of all Clients with Client-Version and OS ====
 +
 +<code>
 +# for client in $(bpplclients -allunique -l | awk '{ print $2 }'); do info=$(bpgetconfig -s "${client}" -l 2>/dev/null); if [[ ! -z "${info}" ]]; then echo "${client};${info}"; fi; done
 +myClient01;Client of myMasterServer;Linux, SuSE2.6.16;7.5.0;NetBackup;7.5;750000;/usr/openv/netbackup/bin;Linux 3.12.51-52.31-default ;
 +myClient02;Client of myMasterServer;Linux, SuSE2.6.16;7.6.0;NetBackup;7.6;760000;/usr/openv/netbackup/bin;Linux 3.12.28-4-default ;
 +myClient03;Client of myMasterServer;PC-x64, WindowsXP;7.6.1;NetBackup;7.6;760000;C:\Program Files\VERITAS\NetBackup\bin;Windows2012 6 ;
 +</code>
  
 ===== Client ===== ===== Client =====
Line 101: Line 241:
 </code> </code>
  
 +<code> 
 +lsof -n -P -p $(pgrep "bpbkar|bpfilter" | xargs | tr ' ' ',') | awk '{ if($4!="mem" && $5!="DIR"){print} }' 
 +</code>
apps/netbackup/cli.1442261562.txt.gz · Last modified: 2015-09-14 22:12 by root