Home > ASM (Automatic Storage Management) > How To Copy Backup Files Between ASM Environments?

How To Copy Backup Files Between ASM Environments?

Hi Friends,

In this article I will tell about copying our backup files from an ASM environment to another. Suppose there are two different server which are named TALIP1 and TALIP2. There is an ASM instance on these servers and we want to copy backup files located in ASM Diskgroup from TALIP1 to TALIP2. The steps will be as follows.

1- Logon to TALIP1 as oracle user and set following environment vaiables for ASM.

export ORACLE_HOME=/oracle/grid11g
export ORACLE_SID=+ASM

2- Create an oracle directory object on ASM directory containing our backup files.

sqlplus / as sysdba
SQL> create directory TALIP1 as ‘+RECO/talipdb/backupset/22_06_2012’;

3- Logon to TALIP2 as oracle user and set following environment vaiables for ASM.

export ORACLE_HOME=/oracle/grid11g
export ORACLE_SID=+ASM

4- Create a directory called 22_06_2012 under +RECO/talipdb/backupset

ASMCMD> cd +RECO/talipdb/backupset
ASMCMD mkdir 22_06_2012

5- Create an oracle directory object on ASM directory where we want to copy our backup files.

sqlplus / as sysdba
SQL> create directory TALIP2 as ‘+RECO/talipdb/backupset/22_06_2012’;

6- Logon to TALIP1 as oracle user and set following environment vaiables for ASM.

export ORACLE_HOME=/oracle/grid11g
export ORACLE_SID=+ASM

7- Create a database link to access from TALIP1 to TALIP2.

sqlplus / as sysdba
SQL> create database link TALIP2link connect to system identified by oracle using ‘TALIP2’;

8- Copy backup files one by one from TALIP1 to TALIP2.

SQL> exec dbms_file_transfer.put_file(‘TALIP1′,’users.260.778251563′,’TALIP2′,’users.260.778251563′,’TALIP2link’);

The usage of dbms_file_transfer.put_file procedure as follows.

dbms_file_transfer.put_file( SOURCE_DIRECTORY_OBJECT, SOURCE_FILE_NAME, DESTINATION_DIRECTORY_OBJECT, DESTINATION_FILE_NAME, DESTINATION_DATABASE )

Talip Hakan Öztürk

Advertisements
  1. December 15, 2012 at 11:14 pm

    Nice post. I learn something new and challenging on sites I stumbleupon on a daily
    basis. It will always be interesting to read content from other authors and practice something
    from other websites.

  2. July 19, 2014 at 3:44 am

    Hi there to every one, it’s in fact a pleasant for me to pay a visit this
    web site, it includes important Information.

  1. May 20, 2013 at 1:15 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: