oracle 安全备份与rman_如何将 Oracle 的 RMAN 备份存储到 ASM 磁盘组

本文介绍了如何使用RMAN配合ASM进行Oracle数据库的安全备份。内容包括通过RMAN将数据库数据文件复制到ASM磁盘,创建RMAN备份在ASM上的方法,以及直接备份到ASM和配置ASM闪回恢复区的详细步骤。讨论了ASM如何简化Oracle文件类型的磁盘管理,以及ASM实例的相关概念和初始化参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

RMAN 的备份可以放到 ASM 里面吗?当然是可以的,但是不推荐,因为如果 ASM 出现问题,则备份也将不可读取访问。

6a9a7fd13ff3d8cc3e6fde1c68e8f4d6.png

找到一段 RMAN 备份到 ASM 的范例,摘录供参考。

You can use RMAN in conjunction with ASM. In the following sections, we will cover the following RMAN-related operations:

  1. Copying database datafiles to an ASM disk with RMAN

  2. Creating RMAN backups on ASM

**Copying Database Datafiles to an ASM Disk with RMAN
**
If you want to move your entire database to ASM, you can easily do this with RMAN. First you make an image copy of the database, copying it to an ASM disk group. Then use the RMAN switch database to copy command to switch the database from using the old datafiles to using the new datafiles that were copied onto the ASM drives. Here is an example of moving the database datafiles using the following commands:

RMAN>shutdown

RMAN>startup mount

RMAN>backup as copy database format ’+COOKED_DGROUP1’;

RMAN>switch database to copy;

RMAN>alter database open;

Creating RMAN Backups on ASM

RMAN backup sets can be made to ASM disks. This means that the database, archived redo logs, control-file backups, and spfiles can all be backed up to ASM disks. There are two different ways of using ASM for backups. You can send individual backups directly to an ASM disk group, or you can define the flash recovery area to be a disk group and cause backups to be sent to the flash recovery area. Let’s look at these two options in a bit more detail.

Backing Up from RMAN to ASM Directly

Backing up to an ASM disk group with RMAN is quite easy. Use the RMAN backup command and add the format parameter indicating the disk group to which you want to back up the database. Here is an example:

RMAN>backup as compressed backupset database format ’+COOKED_DGROUP1’;

You can also back up archived redo logs and database control files using RMAN via the same method.

Configuring and Backing Up to an ASM Flash Recovery Area

The flash recovery area is a directory structure that centralizes Oracle backups in one Oracle-defined backup structure (see Chapter 2 for more on the flash recovery area). You define the flash recovery area by setting the DB_ RECOVERY_FILE_DEST and DB_RECOVERY_ FILE_DEST_SIZE parameters as required. Here is an example of using the alter system command to point the flash recovery area to an ASM disk group.

alter system set db_recovery_file_dest=’+COOKED_DGROUP1’; 

alter system set db_recovery_file_dest_size=4G;

Once these parameters have been set, RMAN backups will start using the flash recovery area and ASM since the flash recovery area has been configured to use an ASM disk group.

Summary
In this chapter, we showed you how Automatic Storage Management (ASM) can reduce or eliminate the headaches involved in managing the disk space for all Oracle file types,

including online and archived logs, RMAN backup sets, flashback logs, and even initialization parameter files (spfiles).

We reviewed the concepts related to a special type of instance called an ASM instance along with the initialization parameters specific to an ASM instance. In addition, we described the dynamic performance views that allow you to view the components of an ASM disk group

as well as to monitor the online rebalancing operations that occur when disks are added to or removed from a disk group. Starting and stopping an ASM instance is similar to starting and stopping a traditional database instance. Of course, other databases that use disk groups within the ASM instance will not be available to users if the ASM instance is not available to service disk group requests.

ASM filenames have a number of different formats and are used differently depending on whether existing ASM files or new ASM files are being referenced. ASM templates are used in conjunction with ASM filenames to ease the administration of ASM files.

Additionally, we reviewed ASM disk group architecture, showing how failure groups can provide redundancy and performance benefits while eliminating the need for a third-party logical volume manager. Dynamic disk group rebalancing automatically tunes I/O performance when a disk is added or deleted from a disk group or a disk in a disk group fails.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值