Oracle® Secure Backup Reference Release 10.1 Part Number B14236-02 |
|
|
View PDF |
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:
|
Prerequisites
Note the following prerequisites:
This tool is compatible with Oracle Database 10g Release 2 (10.2), Oracle Secure Backup 10.1, and any media manager compatible with RMAN.
The following environment variables required for migrate2osb
to identify the database must be set: ORACLE_HOME
, ORACLE_SID
, and PATH
.
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
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
.
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.
Restores only backup pieces created on or before the specified date. By default the tool restores all backup pieces until the last backup piece.
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 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
Specifies the staging location on disk for RMAN backup pieces. This option is required when specifying --restore
or --backup
.
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.
Restores backup pieces in the directory specified by the --directory
option to Oracle Secure Backup.
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 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'
Displays the complete list of backup pieces in Legato.
Example
Example 5-5 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.