RMAN backup full database

Source: Internet
Author: User

RMAN backup full database

Backup database; -- backup the entire database
Backup database format '\ xxxxxx \ xxx _ % U'; -- backs up the entire database to the specified path
Backup tablespace users; -- backup tablespace
Backup datafile 'f: \ ORACLE \ ORADATA \ JSSBOOK \ users01.dbf'; -- BACKUP of data files
Backup current controlfile; -- BACKUP of Control Files
Backup database include current controlfile; -- BACKUP means that the control file is backed up together.
If the automatic backup control file is enabled, any backup will automatically back up the control file
Configure controlfile autobackup on;
Backup archivelog all; -- BACKUP the archive files that can be accessed
Backup current controlfile plus archivelog; -- Archive first, back up all archives, back up control files, archive, and back up newly generated Archives
The preceding sections describe various routine backups. The following sections describe several concepts:
Backup set: contains one or more physical files.
Backup set type:
Data File: contains data files and Control Files
Archived logs: Only archived logs are included.
Backup set features:
The BACKUP set is created using the BACKUP command. The FILESPERSET parameter can control the number of data files contained in the BACKUP set. The BACKUP set contains one or more
The physical file used as the backup part. The backup part is the physical file of the operating system. You can write the backup set to a disk or tape. You must restore the backup before recovery.
Extract files from the backup set. The backup set of the archived redo log file cannot be an incremental backup. The backup set does not contain data blocks that have never been used, even full backup or level 0 backup.

Backup slice:
A backup set usually contains only one backup part. A backup file is a physical file that contains one or more Oracle data files or archived logs.
For large databases, a backup set may exceed the maximum capacity of a single tape disk, physical disk, or operating system file.
You can use the configure channel or allocate channel command and the MAXPIECESIZE option to limit the size of each backup set.
The preceding figure shows the BACKUP command. format indicates the path and name of the physical file to be generated. filesperset indicates the files contained in each BACKUP set. There are many BACKUP command parameters, for more information, see the online documentation. Remember to use this document. If you do not use automatic pipeline allocation, You can manually allocate the file, for example, run {
Allocate channel c1 type disk;
Backup...
} Remember that the non-archive mode can also be used for RMAN backup, but the database can only be in the mount state, and the backup is a consistent backup.
Backup set parallelization:
You can set the PARALLELISM option of the CONFIGURE command to greater than 1 or manually allocate multiple channels to CONFIGURE parallel backup.
RMAN executes its operations in parallel.
Multiple backup sets are written in parallel.
Note:
Backup set cannot span Channels
The two parameters we just mentioned, maxpiecesize and filesperset, are in the same channel.
RMAN> run {
2> allocate channel c1 type sbt;
3> allocate channel c2 type sbt;
4> allocate channel c3 type sbt;
5> backup
6> incremental level = 0
7> format '/disk1/backup/df _ % d _ % s _ % p. bak'
8> (datafile 1, 4, 5 channel c1 tag = DF1)
9> (datafile 2, 3, 9 channel c2 tag = DF2)
10> (datafile 6, 7, 8 channel c3 tag = DF3 );
11> SQL 'alter system archive log current ';
12>}
In the preceding example, we can see that the data file 145 is allocated to the c1 channel, the 239 is allocated to the c2 channel, and the 678 is allocated to the c3 channel. Image backup:
Duplexed backup is used to generate a backup set copy file with a specified number of copies (up to four copies) at the same time as a backup set, to avoid database corruption and backup loss in the case of a catastrophic accident, resulting in a full crash, improve backup availability. Three methods for image backup:
⊙ BACKUP COPIES
⊙ SET BACKUP COPIES
⊙ CONFIGURE... BACKUP COPIES
Note: RMAN does not generate multiple backup sets, but generates identical copies for each backup part in the backup set.
Backup set:
This is a good understanding, that is, using RMAN to back up the backup set, that is, redundancy for the backup set.
Rman backup backupset to back up disks to disks or disks to tapes

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.