How to transfer the backup set on ASM to the file system

Source: Internet
Author: User
Tags create directory
Document directory
  •  

ASM, File System

On itpub, we can see a problem related to the file transfer in the backup set on ASM. We can see that there are more and more questions about ASM, And we can feel that ASM is becoming more and more popular.
The problem in http://www.itpub.net/thread-1299334-1-1.html
The last question raised by netizens should be of interest to many friends who use ASM.
This is what I backed up:
+ Ddgg4/full_racdb1_01ld1sbj_1
There is no way to create a subdirectory under + ddgg4 like the operating system?
In addition, this local + ddgg4/full_racdb1_01ld1sbj_1, I want to copy a copy to a remote location, how to copy?
First, I mentioned it many times in my previous files,
Methods can be implemented using asmcmd or using alter diskgroup add directory directly in the ASM instance.
The following question may be even more common. Since ASM is a method between raw devices and OS, we cannot use file management commands like OS, but this has been solved in 11g R2. Here we will focus on versions earlier than 11g R2.
There are two methods.
Method 1: Using RMAN and RMAN is a good tool. It is not only a backup function, but also a waste if you only use RMAN for backup.
You can use the backup backupset in RMAN to meet your requirements.
The following is a demo process.
Prepare a backupset first.
Here I backed up a single archivelog for demonstration.
RMAN> Backup archivelog sequence 83294;
Starting backup at 06-may-10
Using channel ora_disk_1
Channel ora_disk_1: Starting archive log backupset
Channel ora_disk_1: specifying archive log (s) in backup set
Input archive log thread = 1 sequence = 83294 recid = 83294 stamp = 718324431
Channel ora_disk_1: Starting piece 1 at 06-may-10
Channel ora_disk_1: finished piece 1 at 06-may-10
Piece handle = + DG1/soldb/backup/0dld1gpq_201710000718324538_20100506 tag = tag20100506t223536 comment = none
Channel ora_disk_1: Backup set complete, elapsed time: 00:00:02
Finished backup at 06-may-10
View the backupset
RMAN> List backup of archivelog sequence 83294;
List of backup Sets
==============================
BS key size device type elapsed time completion time
--------------------
8 97.50 K disk 00:00:01 06-may-10
BP key: 3 Status: available compressed: No tag: tag20100506t223536
Piece name: + DG1/soldb/backup/0dld1gpq_1_718324538_20100506
List of archived logs in backup set 8
Thrd seq low SCN low time next SCN next time
-------------------
1 83294 3111066080 06-may-10 3111066263 06-may-10
Next we will use RMAN to apply this backup set in ASM to the file system.
Backup backupset.
As follows:
RMAN> Backup backupset 8 format'/export/home/Oracle/1. dbf ';
Starting backup at 06-may-10
Using channel ora_disk_1
Input backupset COUNT = 13 stamp = 718324538 creation_time = 06-may-10
Channel ora_disk_1: Starting piece 1 at 06-may-10
Channel ora_disk_1: backup piece + DG1/soldb/backup/0dld1gpq_201710000718324538_20100506
Piece handle =/export/home/Oracle/1.dbf comment = none
Channel ora_disk_1: finished piece 1 at 06-may-10
Channel ora_disk_1: Backup set complete, elapsed time: 00:00:01
Finished backup at 06-may-10
Go to the file system to view
[Oracle @ Solaris ~] PWD
/Export/home/Oracle
[Oracle @ Solaris ~] Ls-Al 1.dbf
-RW-r -- 1 Oracle oinstall 100352 May 6 1.dbf
We can see that the backupset is already in the file system, and there is only 100 K here. This is a log of my manual archive. It is used for experiments and is not necessary to be fully written.
In addition to rman, we can also use copy_file of the dbms_file_transfer package to implement the same process. Let's take a look at this process.
First create directory
SQL> create directory sourcedir as '+ DG1/soldb/backup /';
Directory created
SQL> create directory destdir as '/export/home/Oracle/';/0dld1gpq_201710000718324538_20100506
Directory created
SQL> exec dbms_file_transfer.copy_file ('sourcedir', '0dld1gpq _ 201710000718324538_20100506 ', 'destdir', '2. dbf ');
PL/SQL procedure successfully completed
In this way, we have achieved our goal.
View in the directory
[Oracle @ Solaris ~] PWD
/Export/home/Oracle
[Oracle @ Solaris ~] Ls-Al 2.dbf
-RW-r -- 1 Oracle oinstall 100352 May 6 2.dbf
Both methods can achieve the goal, but there is still a difference. After all, the previous method uses rman, so RMAN leaves a record.
List of backup Sets
==============================
BS key size
-------
8 97.50 K
List of archived logs in backup set 8
Thrd seq low SCN low time next SCN next time
-------------------
1 83294 3111066080 06-may-10 3111066263 06-may-10
Backup set copy #2 of backup set 8
Device Type elapsed time completion time compressed tag
------------------
Disk 00:00:01 06-may-10 No tag20100506t223536
List of backup pieces for backup set 8 copy #2
BP key PC # status piece name
------------
4 1 available/export/home/Oracle/1.dbf
Backup set copy #1 of backup set 8
Device Type elapsed time completion time compressed tag
------------------
Disk 00:00:01 06-may-10 No tag20100506t223536
List of backup pieces for backup set 8 copy #1
BP key PC # status piece name
------------
3 1 available + DG1/soldb/backup/0dld1gpq_201710000718324538_20100506
There is no record of the second method.

*********************************** *****

How to transfer the backup set on ASM to the file system

An architecture DIAGRAM OF ASM

RAC environment create tablespace error ORA-569 on ASM

A peek inside Oracle ASM metadata

Test the template feature in ASM!

Rebalance power of diskgroup

V $ asm_operation

An error occurred while registering the ASM instance.

Use kfed tool to view ASM disk header information

ASM cannot find a disk case for processing [KFED-00303]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.