Skip Headers
Oracle® Secure Backup Reference
Release 10.2

Part Number E05410-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Miscellaneous Programs

This chapter describes the following miscellaneous Oracle Secure Backup programs:

installhere

Purpose

Use the installhere tool to complete the installation of Oracle Secure Backup on a local host only (not over the network). An installation is incomplete if the Oracle Secure Backup software has already been loaded onto the host, but has not yet been installed. You must run this utility as root.

Prerequisites

You must run this utility as root on a Linux or UNIX system.

Syntax

install/installhere installtype [ -a admin-server ] [ -f ]

Semantics

installtype

Specifies the what role is assigned to the host during installation. Valid values are client, mediaserver, and admin.

-a admin-server

Specifies the administrative server for the domain to which this host belongs.

-f

Forces an update of the /etc/obconfig file, which specifies directory defaults. The following sample obconfig file shows typical defaults:

ob dir:                      /usr/local/oracle/backup
local db dir:                /usr/etc/ob
temp dir:                    /usr/tmp
admin dir:                   /usr/local/oracle/backup/admin

The -f option is a useful way to force an update when the host is being reconfigured and Oracle Secure Backup directory defaults are changing.

Example

Example 4-1 uses installhere to complete the Oracle Secure Backup installation on this client host. The command specifies brhost2 as the administrative server for the domain.

Example 4-1 Completing the Installation of a Client

# install/installhere client -a brhost2

makedev

Purpose

Use the makedev tool to configure a tape device for use with Oracle Secure Backup. This tool provides an alternative to creating a device special file with installob.

Prerequisites

You must run this utility as root on a Linux or UNIX system.

Usage Notes

Note the following aspects of makedev usage:

Syntax

install/makedev [ -u unit ] [ -d  ] [ -b bus ] [ -t target ] [ -l lun ] [ -f ]
[ -n ] [ -x ] [ -y ] [ -z ] [ -h | ? | -? ] [ -dr | -mh ]

Semantics

-u unit

Creates the device special file for the tape device specified by Oracle Secure Backup logical unit number, which can range in value from 0 through 31. The Oracle Secure Backup logical unit number of a tape device is a number assigned by you and used by makedev to create unique filenames for the tape devices connected to the media server. Although it is not a requirement, unit numbers usually start at 0.

-d

Uses the default value for each unspecified option instead of prompting for it. Note that you must always specify a unit number (-u) even if you use this option.

-b bus

Specifies the Small Computer System Interface (SCSI) bus number, address, or instance (depending on operating system type), to which the tape device is attached.

Table 4-1 lists the default SCSI bus designation for each supported operating system type.

Table 4-1 Default SCSI Bus Designations

Operating System Default SCSI Bus Type

Solaris

esp0 (driver name/instance)


-t target

Specifies the SCSI target ID of the tape device, which can range from 0 through 15. The default depends on the logical unit number that you specified with the -u option.

-l lun

Specifies the SCSI LUN of the tape device. Most operating systems support only LUN 0 and 1.The default LUN is 0.

Be careful not to confuse the SCSI LUN with the Oracle Secure Backup logical unit number. The LUN is part of the hardware address of the tape device; the Oracle Secure Backup logical unit number is part of the device special file name.

-f

Replaces any existing files or drivers without prompting for confirmation. By default, makedev prompts you to confirm replacement of any existing device special files.

-n

Displays the commands that will be processed by makedev to generate device special files, but does not actually create the files.

-x

Displays all commands as they are processed by makedev.

-y

Traces entry and exit from each subscript as it is processed by makedev.

-z (AIX only)

Generates a trace file, makedev.trc, in the current directory. This file contains the output of the methods used to define and configure the tape device.

[-h | | -?]

Displays a summary of makedev usage. You might be required to type -\? instead of -? to avoid shell wildcard expansion.

-dr

Creates special files for a tape drive. This the default.

-mh

Creates special files for a SCSI tape library.

Example

Example 4-2 uses makedev to create a device special file. The example creates a special file for a tape drive, unit 0, at the default SCSI bus and target.

Example 4-2 Creating a Device Special File for a Tape Drive

# install/makedev -u 0 -d

migrate2osb

Purpose

Use the migrate2osb tool to migrate database backups from Legato Storage Manager and Legato Single Server Version to Oracle Secure Backup.

Legato Storage Manager and Legato Single Server Version are referred to collectively as Legato. Although it is assumed that you are migrating database backups from Legato to Oracle Secure Backup, you can also use the tool to migrate database backups from any supported media management software to Oracle Secure Backup.

Note:

migrate2osb is not included in the standard Oracle Secure Backup installation. Download it from the following URL:

http://www.oracle.com/technology/products/secure-backup

Prerequisites

Note the following prerequisites:

Usage Notes

The migrate2osb tool can operate in the following mutually exclusive modes:

If you do not have sufficient resources to run both Legato and Oracle Secure Backup simultaneously, then you must migrate backups in two steps. Otherwise, you can use restore-and-backup mode to migrate in one step.

Display-Only

In this mode, the utility displays Legato backups on tape. The utility runs in this mode when you specify the --display option.

Restore-Only

In this mode, the utility only restores files from Legato to disk. The utility runs in this mode when you specify the --restore option but not --backup.

Backup-Only

In this mode, the utility only backs up files from disk to Oracle Secure Backup. The utility runs in this mode when you specify the --backup option but not --restore.

Restore-and-Backup

In this mode, the utility first restores backups from Legato to disk and then backs them up to Oracle Secure Backup. The --directory option specifies the staging area. The utility performs the migration in batches of files whose size is controlled by the --size option. The utility runs in this mode when you specify both the --backup and --restore options.

Syntax

migrate2osb {
[ --restore/-r 
  { all | specific | date { [ --fromdate/-f date ] [ --todate/-t date ] } }
  { --mmparms/-m media_management_parameters }
  { --directory/-d staging_directory_name }
  [ --size/-s staging_directory_size ] ]
[ --backup/-b --osbparms/-o osb_parameters ] |
[ --display/-y { --mmparms/-m media_manager_parameters } ] 
}

Semantics

--restore/-r

Restores backup pieces from Legato to the directory specified by the --directory option. Use any of the following values for the restore_type placeholder:

  • all

    Restores all the pieces that were backed up using Legato based on the disk space available.

  • specific

    Displays all backup pieces backed up by Legato and prompts you to specify which piece to restore.

  • date

    Restores the pieces that were backed up within the time period specified by --fromdate and --todate.

--fromdate date

Restores only backup pieces created on or after the specified date. By default the tool restores all backup pieces starting from the first backup piece.

--todate date

Restores only backup pieces created on or before the specified date. By default the tool restores all backup pieces until the last backup piece.

--mmparms media_management_parameters

Specifies media management parameters needed to restore or display Legato backups. These parameters must be identical to those used in the RMAN ALLOCATE CHANNEL commands that you used with Legato.

For example, suppose you specify the following Legato tape library in your RMAN scripts:

ALLOCATE CHANNEL t1 DEVICE TYPE sbt 
  PARMS 'SBT_LIBRARY=/opt/nsr/libnwora.so'

You could set --mmparms in migrate2osb as follows:

migrate2osb --restore all 
  --mmparms 'SBT_LIBRARY=/opt/nsr/libnwora.so' --directory /tmp
--directory/-d staging_directory_name

Specifies the staging location on disk for RMAN backup pieces. This option is required when specifying --restore or --backup.

--size/-s staging_directory_size

Specifies the amount of disk space available for the migration. Specify staging_directory_size in the form nB (n bytes), nK (n kilobytes), nG (n gigabytes), nT (n terabytes). By default the size is assumed to be in bytes.

The --size option only functions when both --backup and --restore are specified. By default the script attempts to restore all required backups to disk before beginning the backup to Oracle Secure Backup.

If the specified size is less than the space needed to store all of the backups being restored, then the migration proceeds in batches of backup pieces. The size of each batch will not exceed the specified size. If any single file exceeds the specified size, then migrate2osb displays a message and does not restore this file. If every file exceeds the specified size, then migrate2osb displays an error and exits.

--backup/-b

Restores backup pieces in the directory specified by the --directory option to Oracle Secure Backup.

--osbparms/-p osb_parameters

Specifies media management parameters needed to back up staged files to Oracle Secure Backup. These parameters must be identical to those used in the RMAN ALLOCATE CHANNEL commands that you use with Oracle Secure Backup.

For example, suppose you specify the following Oracle Secure Backup tape library in your RMAN scripts:

ALLOCATE CHANNEL t1 DEVICE TYPE sbt 
  PARMS 'SBT_LIBRARY=usr/local/oracle/backup/lib/libobk.so'

You could set --osbparms in migrate2osb as follows:

migrate2osb --directory /tmp
  --backup --osbparms 'SBT_LIBRARY=usr/local/oracle/backup/lib/libobk.so'
--display/-y

Displays the complete list of backup pieces in Legato.

Example

Example 4-3 migrates Legato backups created between November 10 and December 10 2005 to Oracle Secure Backup. The example stages the files in a directory named /tmp and sets a maximum size of 10 GB. The command specifies media management parameters for both Legato and Oracle Secure Backup.

Example 4-3 Migrating Legato Backups in Restore-and-Backup Mode

migrate2osb
  --restore date --fromdate '10/nov/05' --todate '10/dec/05'
  --mmparms 'SBT_LIBRARY=/opt/nsr/libnwora.so'
  --directory /tmp --size 10G
  --backup --osbparms 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so'

obcleanup

Purpose

Use the obcleanup tool to generate an editable file listing the volumes in the Oracle Secure Backup catalog and to remove unneeded records.

If previously used volumes are unlabeled or overwritten, then the index daemon automatically removes expired backups from the catalog at the interval set by the indexcleanupfrequency index policy (the default is 21 days). In this case, no manual intervention is necessary.

If volumes expire but are not unlabeled or overwritten, then their catalog entries persist unless you remove them with obcleanup. You can also use obcleanup to remove references to volumes that are no longer needed but are not set to expire. Because the catalogs can consume considerable disk space, you might want to run obcleanup periodically to keep the admin subdirectory of the Oracle Secure Backup home to a manageable size.

Prerequisites

The obcleanup utility operates only on the administrative server.

Usage Notes

When you run the obcleanup program on the command line, it lists the contents of the catalogs in a file, which is opened in an editor. The default text editor is set by the EDITOR environment variable. On Linux and UNIX, the default is /bin/vi if the EDITOR environment variable is not set. On Windows the default is Notepad.

Each line in the file contains a reference to a volume that you could purge from the catalogs. For example:

#Item Identification                  Created     Where Notes
#---- ---------------------------- -------------- ----- ---------------------
    1 VOL000001                  2004/06/07.15:51 IS  IX volume is full 

Volumes that have expiration policies associated with them are noted in this file. If you have discarded or overwritten tapes, then use a text editor to delete the lines corresponding to these tapes from the file, save the modified file, and exit the editor.

After you delete records from the generated file and save it, obixd runs in the background and automatically removes the deleted records from the catalogs. You can configure the obixd cycle time in the index policy. The default cycle time is 21 days.

Syntax

etc/obcleanup [ -a ] [ -d ] [ -s { d | v | t } ] [ -v ]...
etc/obcleanup [ -V ]

Semantics

-a

Shows individual archive records in addition to volume records.

-d

Shows previously deleted records.

-s

Sorts the list by date (d), volume ID (v), or volume tag (t).

-v

Operates in verbose mode. The more -v options you specify, the more verbose the output.

-V

Displays the obcleanup version and exits.

Example

Example 4-4 shows the editable file generated by the obcleanup utility for host brhost2.

Example 4-4 Sample Output from obcleanup

% etc/obcleanup

# This file lists all volumes described in Oracle Secure Backup's
# "volumes" and "index" databases on brhost2.
#
# Edit this file to delete entries from Oracle Secure Backup's databases.
# Delete each line whose corresponding database entry you want
# to remove.  Do not change the contents of the undeleted lines!
#
# Once you've finished, save your changes and exit the editor.
# obcleanup will ask you to confirm these changes before applying
# them to the databases.
#
#Item Identification                  Created     Where Notes
#---- ---------------------------- -------------- ----- ---------------------
    1 tag 00000105                                IS
    2 tag 00000110                                IS
    3 tag 00000111                                IS
    4 tag 00000121                                IS
    5 tag 00000155                                IS
    6 tag 00000156                                IS
    7 tag 00000157                                IS
    8 tag 00000158                                IS
    9 tag AEA649S                                 IS
   10 tag AEA650S                                 IS
   11 tag AEA655S                                 IS
   12 tag AFX935                                  IS
   13 tag AFX936                                  IS
   14 tag AFX936                                  IS
   15 full-000001             2005/01/17.18:12    IX
   16 full-000002             2005/01/17.18:12    IX
   17 full-000003             2005/01/17.18:12    IX
   18 full-000004             2005/06/05.01:02    IX
   19 full-000005             2005/07/04.01:02    IX
   20 full-000006             2005/08/06.01:04    IX
   21 full-000007             2005/09/06.01:00    IX
   22 full-000008             2005/09/06.01:00    IX
   23 full-000009             2005/11/04.15:05    IX
   24 full-000010             2005/11/04.15:05    IX

obcm

Purpose

Use the obcm tool to export or import an identity certificate. These steps are required if you do not accept the default Oracle Secure Backup security behavior, which is for the Certification Authority (CA) to issue a signed certificate to each new host over the network.

The observiced daemon on the administrative server acts as the CA. The CA has two responsibilities with respect to certificates: it accepts certificate signing requests from hosts within the administrative domain as part of the mkhost process, and sends signed certificates back to the requesting host.

In manual certificate provisioning mode, you run obcm export --certificate on the administrative server to export a signed certificate for the newly configured host. You must manually transfer this signed certificate to the newly configured host.

After manually transferring the certificate to the new host, run obcm import on the newly configured host to import the signed certificate into the host's wallet. In this case, obcm directly accesses the wallet of the host. After it has made changes to the local wallet, obcm notifies the local observiced so that the local observiced can re-create the obfuscated wallet.

Prerequisites

All obcm commands should be run as root in Linux or UNIX or as an administrative user in Windows.

You must have write permissions in the wallet directory, which by default is /usr/etc/ob/wallet on Linux and UNIX and C:\Program Files\Oracle\Backup\db\wallet on Windows. Note that obcm always accesses the wallet in this location. You cannot override the default location.

Syntax

obcm chpass --keywallet/-k name [--newpass/-n new_psword][--oldpass/-o old_psword]
obcm decertify [-nq]
obcm display [--identity/-i|--keywallet/-k] [--password/-p psword] [--verbose/-v]
obcm export {--certificate/-c|--request/-r} --file/-f cert_file --host/-h hostname
obcm import --file/-f signed_certificate_file
obcm mkow --keywallet/-k key_wallet [--password/-p psword]

Semantics

chpass --keywallet/-k name [--newpass/-n new_psword [--oldpass/-o old_psword]

Changes the password for the Oracle Secure Backup encryption key wallet. The --keywallet argument is required. If --newpass or --oldpass is not specified, then you are prompted for the corresponding password.

decertify [-nq]

Deletes local host certification data. If you specify -nq, then the command does not display a confirmation message. If you do not specify this option, then the command displays a confirmation message. The message is described in "Command Execution in Interactive Mode".

>>The following four paragraphs are new. They are adapted from an e-mail from Indra dated 10/29/07. CBF 10/29/07

For proper decertification of a host, Oracle recommends that you first close or kill all obtool sessions and Oracle Secure Backup processes running on that host.

If you run obcm decertify as a user other than root in Linux or UNIX or an administrative user in Windows, then Oracle Secure Backup does not display an error but the host is not decertified. An attempt to decertify the administrative server fails with an error. The obcm decertify command can be run more than once on other hosts, but only the first operation actually decertifies the host.

You can use the rmhost --nocomm/-N hostname command to remove a decertified host from the Oracle Secure Backup domain.

To recertify a decertified host, Oracle recommends that you use the obcm export and obcm import commands, rather than using the obtool rmhost and mkhost commands. Because the rmhost and mkhost commands remove the host and add it back in to the domain, they attribute some of the Oracle Secure Backup objects as deleted.

display {[-i identity] | [-k key_wallet]} [-p password] [-v]

Displays the contents of the identity or encryption key wallet. If neither --identity nor --keywallet is specified, then --identity is assumed. You can use the --password option to display the contents of the password-protected encryption key wallet. This can be useful during a recovery from a lost catalog, when the obfuscated version of the encryption key wallet has been lost.

export {--certificate/-c | --request/-r} [--file/-f cert_file] [--host/-h hostname]

The --certificate option exports a signed identity certificate for the specified host to the specified text file. The --request option exports a certificate request for the specified host to the specified text file. Both the --file and --hostname arguments are required.

import [--file/ -f signed_request_file]

Imports a signed identity certificate from the specified text file. The --file argument is required.

mkow [--keywallet/-k key_wallet] [--password/-p password]

Re-creates the obfuscated encryption key wallet. If --password is not specified, then you are prompted for the password..

Examples

Example 4-5 exports a certificate for host new_client to the file new_client_cert.f. The utility is run on the administrative server.

Example 4-5 Exporting a Signed Certificate

obcm export -c -f /tmp/new_client_cert.f -h new_client 

Example 4-6 imports a signed identity certificate from the file client_cert.f. The utility is run on the host being added to the administrative domain.

Example 4-6 Importing a Signed Certificate

obcm import -f /tmp/new_client_cert.f

obcopy

Purpose

Use the obcopy tool to copy one tape volume to another. Copying starts at the beginning of the input tape and ends when the input tape drive reports blank tape (end of media). It is possible for the volumes to be different media types. For example, you can copy an 8mm tape to a 4mm tape.

Usage Notes

Note the following aspects of obcopy usage:

Syntax

etc/obcopy [ -c ] [ -e ] [ -n cnt ] [ -f ] [ -s ] [ -t ] [ -u ] [ -v ]
       [ -V ] [ -h | ? ] input_device output_device

Semantics

-c

Compresses output even if input is not compressed. If the output tape device does not support compression, then obcopy issues a warning and does not compress the output.

-e

Performs a byte-by-byte comparison of the contents of the input and output tapes to determine whether the data is the same. No copy is performed.

-n cnt

Copies at most cnt files from the source tape.

-f

Defaults to disk file if a tape device name is not found.

-s

Does not rewind input_dev before starting copy.

-t

Does not rewind input_dev before starting copy.

-u

Uncompresses output even if input is compressed.

-v

Specifies an input file with varying internal block sizes. Normally, obcopy redetermines the block size after reading a filemark. In other words, obcopy assumes that all blocks in a file (the data between two filemarks) are the same size. Specify -v only if the block size changes between files.

-V

Prints the obcopy version.

-h

Prints full help.

input_device

Specifies the tape device containing tape to be copied from.

output_device

Specifies the tape device containing tape to be copied to.

Examples

Example 4-7 uses obtool to show that tape library lib1 has a tape containing data loaded in its tape drive and tape library lib2 has a blank tape loaded in its tape drive.

Example 4-7 Displaying Volumes in Two Libraries

ob> lsdev
library    lib1             in service
  drive 1  tape1            in service
library    lib2             in service
  drive 1  tape2            in service
ob> lsvol --library lib1 --long
Inventory of library lib1:
    in    mte:           vacant
    in    1:             volume RMAN-DEFAULT-000002, barcode ADE202, oid 111, 8087104 kb remaining, 
                         content manages reuse
    in    2:             volume VOL000002, barcode ADE201, oid 108, 8029472 kb remaining
    in    3:             vacant
    in    4:             vacant
    in    dte:           volume VOL000003, barcode ADE203, oid 114, 8083360 kb remaining, lastse 4
ob> lsvol --library lib2 --long
Inventory of library lib2:
    in    mte:           vacant
    in    1:             volume VOL000004, barcode DEV423, oid 118, 8079520 kb remaining
    in    2:             volume RMAN-DEFAULT-000003, barcode DEV424, oid 120, 8078656 kb remaining, 
                         content manages reuse
    in    3:             vacant
    in    4:             vacant
    in    iee1:          vacant
    in    iee2:          vacant
    in    iee3:          vacant
    in    dte:           unlabeled, barcode DEV425, oid 121, lastse 3
ob> quit

Example 4-8 uses obcopy to copy the data from the tape in the tape1 tape drive to the tape in the tape2 tape drive.

Example 4-8 Copying One Tape to Another with obcopy

% obcopy tape1 tape2
3.8 MB in 3 files copied
%

osbcvt

Purpose

Use the osbcvt command-line tool to migrate Reliaty Backup configuration and catalog data to Oracle Secure Backup. The installob scripts runs osbcvt automatically during a migration, so you would not typically be required to run it manually.

osbcvt performs the following tasks:

  1. Selects the source and destination directories.

  2. Moves relevant information from the source to destination admin directory. Relevant information includes hosts, devices, media families, schedules, datasets, index directories, and archive and volume catalog files.

  3. Reads the /etc/rbconfig file and converts the parameters it contains to the /etc/obconfig equivalents.

  4. Processes server and client hosts.

See Also:

Oracle Secure Backup Migration Guide to learn how to migrate from Reliaty Backup to Oracle Secure Backup

Usage Notes

Note the following aspects of osbcvt usage:

Syntax

install/osbcvt [ -srcdir srcdir_name ] [ -help ]

Semantics

-srcdir srcdir_name

Specifies the location of the admin directory in the Reliaty Backup home. If it is not specified, then the location is determined from /etc/rbconfig. The program exits with an error message if -srcdir is not specified and the computer is not an administrative server in a Reliaty Backup domain.

-help

Prints usage information.

Example

Example 4-9 uses osbcvt to migrate the Reliaty Backup catalog and configuration data contained in /space/reliaty/backup_3132/admin.

Example 4-9 Displaying Volumes in Two Libraries

# install/osbcvt -srcdir /space/reliaty/backup_3132/admin
Starting data migration from Reliaty Backup to Oracle Secure Backup.
The Reliaty Backup admin data will be moved to /usr/local/oracle/backup
  
Data migration from Reliaty Backup is complete.

stoprb

Purpose

Use the stoprb tool to stop Reliaty Backup daemons on one or more hosts.

Syntax

install/stoprb [ hostname... ]

Semantics

hostname

Stops Reliaty Backup daemons on the specified hosts. If you do not specify hostname, then stoprb stops Reliaty Backup daemons on the local host.

Example

Example 4-10 stops the Reliaty Backup daemons on hosts brhost2 and brhost3.

Example 4-10 Stopping Reliaty Backup Daemons on Remote Hosts

stoprb brhost2 brhost3

uninstallob

Purpose

Use the uninstallob tool to uninstall Oracle Secure Backup from a host in the administrative domain.

Prerequisites

You must run this utility as root on a Linux or UNIX system.

Usage Notes

Syntax

install/uninstallob [ -m host ] [ -q obparmsfile ] [ -U | -UU ]

Semantics

-m host

Specifies the name of the host from which to uninstall Oracle Secure Backup so that the script does not prompt for the name.

-q obparmsfile

Specifies the name of an obparameters file so that the script does not prompt for the file name.

-U

Suppresses all prompts. The script does not delete the admin directory.

-UU

Suppresses all prompts. The script deletes the admin directory.

Example

Example 4-11 uses uninstallob to uninstall Oracle Secure Backup from client brhost2. The script runs noninteractively.

Example 4-11 Uninstalling Oracle Secure Backup

# install/uninstallob -m brhost2 -UU