Basic knowledge of RMAN backup

Source: Internet
Author: User

I. Basic Theoretical knowledge of rman backup

Rman (recovery manager) is used to manage backup, dumping, and recovery operations. When the rman command is executed, Oracle parses these commands into PL/SQL blocks, the server processes execute these PL/SQL blocks to complete the backup, dumping, recovery, and other operations.

Because rman backup, dumping, and recovery operations are performed by server processes, the backup and recovery operations performed by rman are also called "Server Management backup"

Ii. Features of Rman backup:

RMAN is block-level backup and recovery.
Automatic backup and recovery · convenient backup and archiving logs
· Automatic Detection of new data files
· Support Incremental Backup
· Minimize backup and recovery errors
· Reduce recovery time
· No additional redo logs are generated during hot backup.
· Automatic Detection Of Bad blocks · parallel backup and recovery operations
· During online backup, The tablespace is not in the backup mode.

III. Basic command structure
1. single command
Backup database
2. Batch Commands
Composed of multiple single commands

Rman> run {
Allocate channel cha1 type disk;
Backup format'/oracle/ora10g/rmanback/full _ % u _ % T"
Tag full_backup_wolf
Database;
Release channel cha1;
}
3. default Parameter
 
RMAN configuration parameters:
RMAN> show all;
Configure retention policy to recovery window of 7 DAYS;
Configure backup optimization off; # default
Configure default device type to disk; # default
Configure controlfile autobackup off; # default
Configure controlfile autobackup format for device type disk to '% F'; # default
Configure device type disk parallelism 1 backup type to backupset; # default
Configure datafile backup copies for device type disk to 1; # default
Configure archivelog backup copies for device type disk to 1; # default
Configure maxsetsize to unlimited; # default www.2cto.com
Configure encryption for database off; # default
Configure encryption algorithm 'aes128 '; # default
Configure archivelog deletion policy to none; # default
Configure snapshot controlfile name to 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ DATABASE \ SNCFORCL. ORA '; # default
Note: # default indicates that the configuration is still the initial default value. Go back to the default configure .. clear configuration.
 
1) configure retention policy ..
To determine which backups are not needed, there are three options:
A) redundancy 5
Indicates the number of backup sets in a data file. Five copies are provided here.
B) recovery window of 7 days
Indicates that you want the database to be restored to a few days ago.
C) none
Indicates that no retention policy is required.
Note: a) and B) are mutually exclusive.
 
2) configure backup optimization ..
Theoretically, backup optimization only applies to read-only or offline tablespaces. Of course, archive log files that have been backed up will also be skipped.
The default value is off.

3) configure default device type ..
Specify the device type for the I/o operation: SBT or DISK. The default value is disk.
 
4) configure controlfile autobackup ..
When autobackup is not set to on, rman will automatically back up the control file for any backup operations.
 
5) configure controlfile autobackup format for device type disk to '% F'
Configure the path and format of the backup slice of the Control File
For example, configure controlfile autobackup format for device type disk to 'e: \ backupcontrol \ % F'
 
6) configure device type disk parallelism 1 BACKUP TYPE TO BACKUPSET
Configure the degree of parallelism of the database device type. The number of parallel threads determines the number of opened channels.
 
7) configure datafile backup copies for device type disk to 1
Configure archivelog backup copies for device type disk to 1
Whether to enable composite backup to generate a specified number of copies to a specified position in a specified I/o device. The default value is 1.
This configuration is only used for data files and archive files. It takes effect only when channels are automatically allocated!
 
8) CONFIGURE MAXSETSIZE TO UNLIMITED
Configure the size of the Backup set. Generally, maxpiecesize is configured to restrict the backup parts.
 
9) CONFIGURE ENCRYPTION FOR DATABASE OFF
Configure the encrypted backup set. Specific tablespace:
Configure encryption for tablespace users on;
If we execute set encryption on indentified by think only, this password is required for the backup created immediately after it can be restored normally.
 
10) configure encryption algorithm 'aes128'
Specify the encryption algorithm. The other one is 'aes256'
 
11) CONFIGURE ARCHIVELOG DELETION POLICY TO NONE
Specifies the deletion policy for the archive file. The default value is none, that is, it can be deleted after the archive backup is complete.
However, in the DG Environment, the DBA must ensure that the archive file is always saved on the primary end before the standby end receives the file successfully and applies it.
So, when the DG Environment is set to: applied on standby
 
12) configure snapshot controlfile name to 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ DATABASE \ SNCFORCL. ORA'
Configure the storage path and file name of the snapshot file of the control file. This snapshot file is generated during Backup and used to control the read consistency of the file.
 
13) In addition, the configure exclude for tablespace <tablespace> [CLEAR] command is used to not back up the specified TABLESPACE to the backup set. This command is very useful FOR read-only tablespaces.
 
--------------------------------
Configure the channel format
Configure channel device type disk2 format '/disk1/rman_bak/cuug/% d_5s _ % p. bak ';

Related Article

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.