TOC PREV NEXT INDEX

Appendix D Command-Line Utilities
The following BP utilities are available from the command-line. Most commands are accessed from the BP server, with a few exceptions for Unix and Windows clients. Following Table 31 is a complete description of each utility.
TABLE 31. Command-line Summary
Command Access Summary
bpbuild Server Populate specific database tables
bpr All Queue a backup or restore request
bputil Server Set of tools
dispatch Server The task queue facility
inittape Server Label, retire, and manage tapes
lcsexec Server Manage the backup scheduler
printdb Server Dump database tables
prorpt Server Generate backup, restore, and schedule reports
reorgdb Server Database fix up
sizer Server Determine true physical size of tapes
span_tapes Server Backup server splitting files across tapes in juke box

inittape

Usage
inittape [-d device_no|device_name]
[-t new tape number]
[-l tape label text]
[-e retention period <30>]
[-z tape size in megs <4000>]
[-s scratch tape only, requires -t]
[-r retires tape only, requires -t]
[-v verify device only, requires -d]
[-i info of tape/tapes]
[-c clear tape status, requires -t]
[-y answer yes to all questions]
[-n specified node name]
[-U Import unknown clients]
[-N Non-destructive import]
[-D import tape into database, requires -n -d
{-h w/headers} ]
Description
The purpose of inittape is to manage tape labels and tape status. Tapes must have a tape label on them with specific information about the tape's usage. Generally you should supply the device name -d sctape and tape number -t # with the operation that you want performed. You should always refer to the device name using its nickname.
Examples
To label a tape with the next available tape number.
inittape -d sctape -l "My next tape" -e 30 -z 4000 -t 0
To label at tape with a tape number of 7.
inittape -d sctape -l "My next tape" -e 30 -z 4000 -t 7
To scratch tape 7's contents and make it recyclable/usable
inittape -d sctape -t 7 -s
To retire a tape 7 so that it will not be used again.
inittape -d sctape -t 7 -r
To verify a device is usable by Backup Professional
inittape -d sctape -v
To get statistics on a tape or all tapes in the database.
inittape -i (for all) or inittape -i -t <specific tape number>
To clear a tape's status in the database so that is appendable.
inittape -c -t <specific tape number>
To import backups of client "pioneer" into the database
inittape -D -n pioneer -d sctape
inittape -D -n pioneer -d sctape -h (-h imports files also)

dispatch

dispatch -[vd] {start,stop,status,cancel,reset}
start: START Backup Professional Task Manager
stop : STOP Backup Professional Task Manager
status: SHOW status of tasker (running/aborted/stopped)
reset: RESET Reintializes tasker
cancel: CANCEL all currently scheduled tasks
cancel_verifies: CANCEL currently scheduled Verify tasks
-v: verbose mode
-d: debug mode
Description
The dispatch program is used to start and stop the Backup Professional scheduler daemon. You can also get the status of the daemon as well as cancel all jobs that are pending in the scheduler.
Examples
To start the Backup Professional scheduler:
dispatch start
To stop the Backup Professional scheduler:
dispatch stop
To cancel all pending jobs:
dispatch cancel

bpr

Usage

bpr -{MIcCrxNUtTP} [vVfbehnkslLpmGEFZSdaRA] [tape] [blocksize] files...

-c: copy files to disk or tape -x: extract(restore) files
-h: Host Name to (restore/backup) -N: Non-destructive restore
-M: Master backup -t: rapid listing of table of contents
-I: Incremental backup -T: true verification of all files
-r: add files to end of floppy -v: verbose option
-b: block factor (MAX is 4194303)
-k: volume size in kilobytes -n: device can seek (forces compression)
-s: volume size in 512 byte blocks -E: exclude files/directories (64 each)
-F: read filenames from file -f: filename of floppy, tape, or hard disk
-P: Pack files, non-seeking device -Z: compress binary executable files also

-e: prevents splitting file across extents (Use with k option)
-G: change group number to xxx (install/remove by groups)
-m: use extraction modification time rather than original
-V: Save carbon copy of screen output to Catalog file on remove system

-d: set depth of directory traversal -U: Update file if newer than disk file
-S Speed option (Double Buffering) -d: set depth of directory traversal
-l: report unresolved links -U: Update file if newer than disk file
-R: Read Lock files (Warn if can't) -RR: Read Lock files ( ENFORCED Lock)
-X: Exclude list file
-zWHERE={directory} where restored files go
-zALL_FILES: Search through all files on a tape on restore
-zDATE=3/1/1998-14:22
-zTRIM14: Trim files to 14 characters
-zDATEBEFORE={date}
-zNODIR: No backup of directory perms
-zBUFFERS={nn} Double buffers
-zFLAT: Flat file restore
-zBG: Force background mode
-zNOCNVT: No conversion of DOS files
-zDEV=/dev/r{dev} raw device backup
-zSWAB: Byte swap data
-zRESTART={filename} to restart a backup
-zSTATION={Name of workstation where files are backed up from or restored to}
-zSERVER={server name where tape drive resides, defaults to local host}
-zBACKUP={nn,Last_PCparachute,Last_Master,Last_Incremental}
-zBACKUP specify the backup number one of above keywords you want to restore
-zTAPENO={nn} tape number where backup is located
-zLCS={nn} schedule number (generates schedule summary)
-zPROFILE={profile_name} will execute a profile
-zENV={env1=xxx,env2=yyy} specific environment variables to be set
Description
bpr stands for Backup Professional Requester. You can build custom backups, restores, verifies, and listings of backups from the command-line. As the name suggests, bpr submits requests to the scheduler to perform. If the resources are not available or busy the scheduler will hold the task until resources are available. For those familiar with the TAR command-line, the bpr command line is very similar.
Examples
To perform a master backup of client "sparcy" to device "scsitape":
bpr -MVf scsitape -zSTATION=sparcy.
To perform an Incremental backup of station "sparcy" to device "hp4000" on Server "pionex"
bpr -IVf hp4000 -zSTATION=sparcy -zSERVER=pionex
To backup /u2 of station "sparcy" to device sctape and bit-level verify:
bpr -cVf sctape -zSTATION=sparcy -zVERIFY=2 /u2
To request that a profile be run to "sparcy":
bpr -f sctape -zPROFILE=/usr/bp/profiles.dir/myprofile.spr \
-zSTATION=sparcy
To request file /usr/tom/.profile be restored to station "sparcy" from tape #12:
bpr -xVf sctape -zSTATION=sparcy -zTAPENO=12 /usr/tom/.profile

bputil

Usage:
bputil <-bldjsePVFDATOCLhamkquHGEHR> <args...>

Special cases:

Create a table of useful things you can do with bputil Add a new backup comment:

bputil -b 186 COMMENT "This is a new comment"

Change node number of a backup. This is useful in several cases especially with a computer that can boot multiple operating systems or different versions of the same operating system. For example, you put in a hard drive of windows NT service pack2 of an old machine you really don't use but need archived called barney. The real name of the computer is fred. If you backed up fred, the disk drive of barney was really backed up. You can then add a new client called barney. Change the node number of the fred backup to barney. Suppose the node number of fred is 22 and barney is 23. The backup number is 186

bputil -b 816 NODE_NO 23

Then later when you search under client barney, you see this backup and it no longer appears on the calender of freds' backups.

TABLE 32. Summary
Action Option
Optimize client root disk for Bare Metal backup -X
Tape juke report -d {device_nick_name} REPORT_TAPE_LABEL
Get String from .ini file -g section field default_value ini_file
Set a Job Comment -j <job_no> <comment>
Print BP Working Environment -e [-c] Conditional format
Quick Check of Database Files -O
Change Backup record -b <backup_no><TYPE,STATUS,START_DIR_NO,NODE_NO,TAPE_NO,START_TIME,JOB_NO,FILES>
Put string to .ini file -p [-b] <Section> <Label> <String> <ini_file>
Convert client name to name BP uses -n [-l] [hostname]
Get node info -t [nodename|nodeno]
File checksum -s <file>
Device update -d <dev_name> SLOT_INFO <slot#> REPORT_TAPE_LABELS
Print environment for juke device nick-name -J <nick-name>
Print environment for device nick-name -E <nick-name>
Clear Fmaster from canceled DBupdate -F
Clear Dmaster from canceled DBupdate -D
Update volume -V <backup #> old# new#
Fix Backup Volume -V <backup #>
Remove last backup on tape -T <tape no>
Check DbHostname -C <name>
Get local host name as in DB -L
Re-label all tapes in DB only -a<specific_tape_no> <Tape label text>
How many backups are there to be purged w/ reorgdb PurgeLogicallyDeletedBackups -HB
How many Details are there to be purged w/ reorgdb PurgeDetailUnref -HD
How many Filesets are there to be purged w/ reorgdb PurgeFilesetsUnref -HF
Get next available tape number -k <# last how many>
Put all tasks on hold for a given device -q <device_number>
Test backup number -u <-t test> -b <backup>
Ignore case -G <-i ignore case > string filenames[]
Delete client (permanent) -N clientname


printdb

Usage
printdb [-f outfile]
[-p primary value]
[-n node value]
[-t tape value]
[-b backupno value]
<all> <filenames.....> <def_tapename>
<dirpaths> <filenames>
Description
printdb is used to printout database records and information. Using the keyword all will printout all records from all files. Some files that are keyed by certain fields can accept -n or -t or -b options. For example the backup file can print only those records that match a specific backup_no or node_no or tape_no. This program will generally be used by technical support personnel only.
Examples
To print out backups for node 2 on screen (stdout):
printdb -n 2 -f - backups
To print out the device tapename
printdb def_tapename
To print out all clients
printdb nodes

reorgdb

Usage
reorgdb [-f output filename]
[-w work filename]
[-p No Purge bit set]
<PurgeUnreferencedNetpaths>
<PurgeUnreferencedMasterNames>
<PurgeEmptyBackups>
<BackupSet>
<all> <filenames.....>
Description
reorgdb is the program that will rebuild a Backup Professional database file if it becomes corrupted. Generally, technical support personnel should use this.You do not have to specify the -f or -w. They will default to the /tmp directory. Only use them if you know the default location is not large enough to hold the temporary files. All Backup Professional programs should be stopped before using this program.
Examples
To rebuild the nodes table:
reorgdb nodes
To Purge the unreferenced filenames from the database:
reorgdb PurgeUnreferencedNetpaths

bpbuild

Usage
bpbuild <file> <path_for_conversion | title>
nodes /usr/bp/db/nodes.build
devices /usr/bp/db/device.build
lookups /usr/bp/db/lookups.build
netpaths
filesets
detail
f_master
d_master
magazines
tapes
jobs
batches
library <title>
backups
backup_msg
backup_errors
lcs
lcs_client
all
Description
bpbuild is used to either take a text file and import it into the Backup Professional database or create the desired table for the first time. Generally, only technical support personnel should use this program.
Examples
To import a number of clients in the database:
1. First create the file /usr/bp/db/nodes.build with the following format:
No Machine Type OS Type Vendor Enabled Client name
0 X86 OS5 SCO E fred.unitrends.com
0 Sparc SUNOS SUN E betty.unitrends.com

Valid Machine Types are Alpha, X86, Sparc, Mips, Pentium, RS, HP, 88000, PowerPC, NSC

Valid OS types are DOS, WIN16, NT, W95, OS2, NOV3, UNIX3, ODT, OS5, UNIX4, SOLARIS, SUNOS, NOV4, OSF1, NT_SERVER, AIX, SGI, DGUX, HP/UX, LINUX, BSDI, USL, UNIXWARE.

Vendor is free form. Enable field should be E=Enable D=Disabled. Clientname should be the fully qualified name of the host.

2. Run the command:
bpbuild nodes /usr/bp/db/nodes.build
To import a number of devices from a text file:
1. First create the file /usr/bp/db/devices.build with the following format:
No RewindName BlockSize Size (KB) IsTape IsScsi Nick-Name ScsiBlockSize
archive=0 /dev/nrStp0 120 4000000 y y sctape 1024

2. Then run the command:
bpbuild devices /usr/bp/db/devices.build
To make a new table for example: jobs
bpbuild jobs

lcsexec

Usage
lcsexec [-l lcs_no] -[vdf] {start,stop,status}
start : START logical client set
status: SHOW status (running/idle/stats)
generate: Re-Generate Scheduler History rpt
disable: Disable the WorkGroup #
enable: Enable the WorkGroup #
copy client_name: Copy client from one Group to another
delete client_name: Delete client from a Group
move client_name: Move client from one Group to another
-v: verbal mode
-d: debug mode
-f: force Backups for today to run
-r: Reset Lcs to run at scheduled time today
-l: REQUIRED indicates which WorkGroup to act upon
Description
lcsexec is used to start, reset, and stop an unattended workgroup's backups. Generally, tasker runs this at the appropriate time for each workgroup that is set up in the scheduler.
Examples
To reset Workgroup #3 so that it will run today at its specified time:
lcsexec -r -l 3
To try and run Workgroup #3 jobs, you can run the command:
lcsexec -l 3 start
To disable Workgroup #3 from running from now on:
lcsexec -l 3 disable

prorpt

Usage
prorpt <report_type> report_opts... [-f output] [-text]
Report types have special options:
report_type report_opts
----------- -------------------------------
tape <device_no>
weekly [-date mm/dd/yy] [-order <P|N>]
failure [-date mm/dd/yy] [-order <P|N>]
Description
prorpt is used to generate three different reports. Each report is in HTML format unless the -text option is specified.

The Tape report, tape option, reads a physical tape in the tape drive and generates a report that compares the filename and other file properties, such as size, to the Backup Professional database. All discrepancies are reported.

The Weekly summary report, weekly option, generates a weekly summary of backups for the week. It is a quick week-at-a-glance type of report to see the status of all backups for the week and for all clients as well.

The Failure report, failure option, generates a listing of those backups that failed for a given day.

Examples
To generate the Weekly Summary Report for the week of 3/3/2002 to the screen in text form:
prorpt weekly -date 3/3/2002 -f - -text
Sample "Weekly Summary Report" in HTML form
<HTML><TITLE>WEEKLY SUMMARY REPORT</TITLE>
<PRE>
<B>REPORT DATE: Mar, 20 2002 WEEKLY SUMMARY REPORT PAGE:1</B>
<B>WEEK OF: Mar, 16 2002 =====================</B>
NODE NAME SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY
----------------------------------------------------------------------
pionex.unitrends I-255V I-268V I-279V S-289V S-308V I-345V
alpha.unitrends I-256V I-269V I-280V S-290V S-309V I-346V
win95 I-257V I-270V I-281V S-291V S-310V I-347V
medflex.unitrend I-257V I-297V
O-258 O-298
Win16 M-243V S-275* I-299V
O-244 S-276V O-300
nov_3.12 M-245V I-301V
O-246 O-302
I-260V
O-261
sun M-247V O-269 I-303*
O-248 O-270
----------------------------------------------------------------------
* - Indicates Incomplete or Failed

M - Master I - Incremental S - Selective Backups
R - Restore O - Verify|Listing only</PRE>
^L<PRE>
<B>REPORT DATE: Mar, 20 2002 WEEKLY BACKUP TOTALS PAGE:2</B>
<B>WEEK OF: Mar, 16 2002 ====================</B>
MASTERS SUN MON TUE WED THU FRI SAT TOTAL
----------------------------------------------------------------------
Successful: 8 4 3 6 3 3 27
Incompletes:
Failures 1 1
File Cnt: 163,892
Megs: 5,255
</PRE>
</HTML>

To generate a tape report of tape number 12 to the file /tmp/tape12.rpt in HTML form:
prorpt tape 12 -f /tmp/tape12.rpt
Sample "Failure Report"
<HTML><TITLE>BACKUP FAILURE REPORT</TITLE>
<PRE>
<B>REPORT DATE: Mar, 20 1997 BACKUP SUMMARY REPORT PAGE 1</B>
<B>NodeName: pionex.unitrends =====================</B>
----------------------------------------------------------------------Starting Directory: /
Command Used: -fDcbFVRRR sctape 120 /usr/bp/lists.dir/sub542.inc -zSTATION=pionex.unitrends.com -zWHERE=/
Files to Backup
/devl/bp
-=-=-==-=-=-=-=
Updating Job: 542 w/Tape:(1) ""
Server Cancelled Job
WorkStationName=pionex.unitrends.com
WorkStationAddr=15.0.2.7
Jobno=542
CommandLine=/usr/bp/bin/bkup -fDcbFVRRR sctape 120 /usr/bp/lists.dir/sub542.inc -zSTATION=pionex.unitrends.com -zWHERE=/
Start="Thu Mar 20 11:32:50 1997"
Elapsed=" 2 minutes 50 seconds"
Filecount=879
TotalData=40489
Speed="246560 bytes/sec ( 14.0 MB/min)"
ExitStatus=11
Exit_Status_English=Process Interrupted
</PRE>
</HTML>

Sizer

Usage
sizer [-cuahl] [-t level] blocksize device_name [kilobytes]
or sizer [-cuahl] [-t level] -b blocksize -f device_name [-k kilobytes]
-c: compressed capacity using 50% compressible data
-u: uncompressed capacity (this is the default)
-t: {1-9} level of data redundancy to use, 1 lowest, 9 highest
-b: blocksize in 512 byte tape blocks
-f: device_name to write data to
-k: kilobytes, optional- use this for speed testing only
-a: abbreviated terse output (when run by another script)
-h: report hardware compression status only
-l: leave hardware compression status as is
Description
Sizer is a utility that determines the raw capacity of your tape drive. It is a common problem that either tape cartridge manufactures and sometimes tape manufactures overstate the capacity of their tapes. This can happen when they consider a gigabyte of information to be 1000 megabytes as opposed to 1024 megabytes.

Sizer will write data continuously to the tape drive after turning off the hardware compression. It does this real time and displays the quantity of data being written. It will do this until it either encounters the end of the tape or encounters an error writing data.

Either way, it can be quite a useful tool to determine how much capacity your tape has in the real world. When tape heads become dirty or tape media becomes worn, data is not written as accurately and there can be many re-writes of data to get a good result. This re-writing of data can happen up to 32 times on some drives before the drive will reposition and try again. Each rewrite consumes space on the tape so it is very possible that an old tape or a tape drive with dirty heads will have a lessor capacity that stated on the label.

Examples

To determine native (uncompressed) capacity of 4mm tape that has compression capability.

sizer -u -b 120 -f /dev/dat4mm

To determine capacity using 50% compressible data. This should be about double the native capacity number.

sizer -c -b 120 -f /dev/dat4mm

Speed test using first 800 Mb (800000K) of tape drive to determine its maximum speed.

sizer -b 120 -f /dev/rmt/0 -k 800000

Span_tapes

Usage
span_tapes -[MISVRa] [-E exclude_file ] file1 file2 file3 ...
-M Master backup
-I Incremental backup
-S Selective backup
-V Verify (Bit-level)
-R Restore
-E exclude_file (repeat if needed)
-a automatic mode (don't ask questions)
Description
Span_tapes is a utility that performs backups to a tape drive or juke box and has ability to split file across tapes. This script can perform master backups, selective backups and incremental backups, verifies and restores. The first time you run this script, it will instruct you in how to set up a few default values such as the default tape drive, any default files or directories to exclude.

This utility does not put a BP tape label on the tape and does not inform BP about this backup. For this reason it is suggested you use this to archive the server for periodic vaulting purposes.

Example of Master backup.....: /usr/bp/bin/span_tapes -M /
Example of Bit-level Verify..: /usr/bp/bin/span_tapes -V /
Example of Selective backup..: /usr/bp/bin/span_tape -S /usr
Example of Restore of /usr directory: /usr/bp/bin/span_tapes -R /usr


TOC PREV NEXT INDEX