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

Part Number B14191-01
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.

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 you only want to copy 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.


Note:

Using CONVERT, without specifying a source or destination platform, produces image copies of the datafiles passed to CONVERT in the locations you specify. However, the result is different from BACKUP AS COPY of the same datafiles, because CONVERT does not record the datafile copies produced in the RMAN repository.

The copies produced are not recorded in the repository so that RMAN does not try to use these datafile copies in future restore and recovery operations, or consider the retention policy satisifed based on the creation of these files.


In this example, two datafiles are moved 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';

These datafiles are not in any way part of the RMAN target database, but RMAN is able to read them and create copies of them in the disk group.

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 

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