 |
|
Backup command replaces 9i copy command
Oracle Tips by Burleson |
Oracle 10g RMAN Simplified
Backups to Disk
In previous releases of Oracle, RMAN had two
separate commands to backup data files: BACKUP and COPY. The BACKUP
command backed up the data file only to backup set, which is a
proprietary format recognized by RMAN only. You must use RMAN to
restore a data file from a backup set. The COPY command generated
image copies, which are bit-by-bit copies of data files. You do not
need RMAN to restore a database from an image copy.
The BACKUP DATABASE command can backup a whole
database to backup sets without specifying each individual data
file. However, there is no corresponding COPY DATABASE command.
Therefore, you must run the REPORT SCHEMA command to determine the
file names of the data files, and then you need to specify each data
files in your COPY command.
RMAN> copy
current controlfile to ‘dba/backup/grid/ctlfile.cpy’,
datafile 1 to ‘dba/backup/grid/df1.cp’y,
datafile 2 to ‘dba/backup/grid/df2.cp’y,
datafile 3 to ‘dba/backup/grid/df3.cp’y,
datafile 4 to ‘dba/backup/grid/df4.cp’y,
datafile 5 to ‘dba/backup/grid/df5.cp’y,
datafile 6 to ‘dba/backup/grid/df6.cp’y;
In Oracle 10g, the COPY command is abandoned in
favor of an enhanced BACKUP command that enables you to specify
where RMAN should create copies or backup sets. You can use the new
BACKUP AS COPY command to copy an entire database or multiple
tablespaces, data files, and archived logs.
Here is an example to backup an entire database
as an image copy to the recovery area.
RMAN> backup
as copy
tag
“weekly_backup” database;
|