|Oracle® Database Backup and Recovery Reference
12c Release 1 (12.1)
|PDF · Mobi · ePub|
Add backup pieces and image copies on disk to the RMAN repository
Record a data file copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy
See Also:Oracle Database Backup and Recovery User's Guide to learn how to manage target database records stored in the catalog
You must be connected to the target database, which must be mounted or open. If RMAN is connected to a recovery catalog, then the catalog database must be open.
The file that you are cataloging must meet the following conditions:
It must not exist on an SBT device.
If it is a user-managed copy, then it must be a data file copy, control file copy, archived redo log, or backup piece.
A recovery catalog is required when using RMAN in a Data Guard environment. The recovery catalog supports a unified file namespace for all primary and standby databases with the same DBID but different
DB_UNIQUE_NAME values. Thus, the recovery catalog keeps track of database file names for all primary and standby databases, and also where online redo logs, standby redo logs, temp files, archived redo log files, backup sets, and image copies were created.
"RMAN Backups in a Data Guard Environment" explains how RMAN handles backups made on a different primary and standby databases. In general, tape backups made on one database are accessible to any database in the environment, whereas disk backups are accessible only to the database that created them.
If backups are accessible to the connected target database, RMAN commands such as
RECOVER behave transparently across different databases. You can manually transfer a disk backup from one host in the environment to another host and then catalog the backup. If a backup is on shared disk, then you can use
RESET DB_UNIQUE_NAME to associate the backup with a new database.
||Specifies the file name of an archived redo log to be added to the RMAN repository.
Note: This command does not catalog foreign archived redo log files, which are redo logs received by a logical standby database for a LogMiner session. Unlike normal archived redo log files, foreign archived redo log files have a different DBID.
||Specifies the name of a backup piece to be added to the RMAN repository (see Example 2-39).
The backup piece must be on disk. RMAN verifies the backup piece header before cataloging it. RMAN can catalog a backup piece from a previous database incarnation.
You may choose to catalog backup pieces in the following situations:
If you specify a list of backup pieces, then RMAN attempts to catalog all pieces in the given list even if some of them fail. Cataloging a backup piece creates a new row in
Note: If RMAN creates a server parameter file backup when the
||Specifies the file name of a control file copy to be added to the RMAN repository. The control file copy can be a normal or standby control file copy created by one of the following commands:
Note: RMAN can automatically convert a primary database control file backup to a standby control file during a restore operation.
||Specifies the file name of a data file copy to be added to the RMAN repository (see Example 2-39). You can create data file copies with the RMAN
||Records the data file copy as a level 0 incremental backup (
You can perform incremental backups by using this data file copy as the base level 0 backup.
||Specifies a tag for the data file copy.|
||Catalogs all valid backup sets, data file copies, and archived redo log files in the fast recovery area (see Example 2-41).
RMAN must be connected to a database as
Note: This command also catalogs foreign archived redo log files, which are archived redo log files received by logical standby for a LogMiner session, if they exist in the fast recovery area.
||Catalogs all valid backup sets, data file and control file copies, and archived redo log files whose name start with
RMAN reports any files in the disk location that it cannot catalog. RMAN must be connected to a mounted target database.
If the string pattern specifies a file name, then it matches the left part of the file name pattern. For example,
Note: You cannot use wildcard characters in the string pattern, only a strict prefix.
||Suppresses the confirmation prompt. By default, RMAN prompts after every match.|
Assume that you used a Linux utility to back up the
users01.dbf data file to
/disk2/backup/users01.bak. This example catalogs the data file copy as an incremental level 0 backup and then lists all copies.
CATALOG DATAFILECOPY '/disk2/backup/users01.bak' LEVEL 0; LIST COPY;
This example catalogs a directory full of archived redo log files that were copied into the
/disk2/archlog directory with an operating system utility. The example includes sample output.
CATALOG START WITH '/disk2/archlog' NOPROMPT; searching for all files that match the pattern /disk2/archlog List of Files Unknown to the Database ===================================== File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc cataloging files... cataloging done List of Cataloged Files ======================= File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc
This example catalogs all files in the currently enabled fast recovery area without prompting the user for each one. As shown in the sample output, RMAN displays a message if it finds no files to catalog.
CATALOG RECOVERY AREA; searching for all files in the recovery area no files found to be unknown to the database
Assume that you use an operating system utility to copy a backup piece from one location to another. This example catalogs the backup piece in the new location (sample output included):
CATALOG BACKUPPIECE '/disk1/c-874220581-20061128-01'; using target database control file instead of recovery catalog cataloged backup piece backup piece handle=/disk1/c-874220581-20061128-01 RECID=12 STAMP=607695990