Skip Headers
Oracle® Database Backup and Recovery Advanced User's Guide
10g Release 2 (10.2)

Part Number B14191-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

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

Using RMAN CONVERT to Copy Files Between ASM and Non-ASM Storage

Native operating system commands such as Linux cp or Windows COPY cannot write or read files in Automated Storage Management (ASM) storage. Because RMAN can read and write ASM files, it can be used to copy datafiles into and out of ASM storage, or between ASM disk groups.

If your goal is to migrate parts or all of your database or flash recovery area into ASM storage, see Chapter 16, "Migrating Databases To and From ASM with Recovery Manager". If, however, you just to create copies of some datafiles from non-ASM to ASM storage on the same platform, you can use the CONVERT command, without specifying a source or destination platform.

The methods available for specifying the output filenames for CONVERT described in "Rules for Renaming Files with CONVERT TABLESPACE" apply to this use of CONVERT as well.


Note:

Using CONVERT, without specifying a source or destination platform, produces image copies of the datafiles passed to CONVERT in the locations you specify.

The files produced by using CONVERT in this manner are identical to the files that would be produced by aBACKUP AS COPY of the same datafiles to the same destination.However, CONVERT does not record the datafile copies produced in the RMAN repository. The assumption is that these copies are not being created as part of a backup strategy.

Because these copies are not recorded in the repository, RMAN does not try to use them in future restore and recovery operations, or consider them when determining whether the retention policy is satisifed.

Use BACKUP AS COPY to create image copy backups that RMAN can use in future restore and recovery operations.


Copying Datafiles To ASM Using CONVERT DATAFILE: Example

In this example, two datafiles are copied from the non-ASM storage location /disk1/dbs to the ASM disk group diskgroup using the CONVERT DATAFILE command:

RMAN>  convert datafile 
     '/disk1/dbs/my_tbs_f1.df', 
     '/disk1/dbs/my_tbs_f2.df'
     format '+diskgroup';

CONVERT DATAFILE can be used in this manner to copy datafiles even if they are not part of the connected target database.

Copying Datafiles From ASM Using CONVERT DATAFILE: Example

This example illustrates copying a single datafile out of ASM storage using CONVERT DATAFILE:

RMAN> convert datafile "+DATAFILE/tbs_21.f" format "/tmp/conv_df_%U";
 
Starting backup at 03-JUN-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input filename=+DATAFILE/tbs_21.f
converted datafile=/tmp/conv_df_data_D-L2_I-2786301554_TS-TBS_2_FNO-6_18gm2hft
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:02
Finished backup at 03-JUN-05
 

Copying Tablespaces From ASM With CONVERT TABLESPACE: Example

In this example, the datafiles of tablespace tbs_2 (stored in ASM) are copied from an ASM storage location to non-ASM storage using the CONVERT TABLESPACE command:

RMAN> convert tablespace tbs_2 format '/tmp/tbs_2_%U.df';
 
Starting backup at 03-JUN-05
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=20 devtype=DISK
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00006 name=+DATAFILE/tbs_21.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-6_11gm2fq9.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00007 name=+DATAFILE/tbs_22.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-7_12gm2fqa.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00019 name=+DATAFILE/tbs_25.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-19_13gm2fqb.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00009 name=+DATAFILE/tbs_23.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-9_14gm2fqc.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00010 name=+DATAFILE/tbs_24.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-10_15gm2fqd.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Finished backup at 03-JUN-05