Oracle Rman Backup (ii) BACKUP command options

Source: Internet
Author: User
Tags file size naming convention time limit backup

Five Backup command Options

5.1 Compression

By default, RMAN performs the compression of NULL data blocks.

5.1.1 NULL Control Compression

When using this form of compression, Oracle does not back up unused blocks of data. There are two scenarios where null block compression is performed:

(1) Data blocks that have never been used are not compressed

(2) A block of data that has been used once is not backed up, given a specific standard.

In the first case, all blocks of data in which there is no data will be backed up, and in the second case, if the database and associated databases meet certain criteria, the empty blocks will not be backed up, even if

It contains data at some point. Here are the conditions that allow Rman to not be satisfied with these blocks of data:

(1) Set the compatibility parameter to 10.2

(2) No guaranteed restore point is defined for the database.

(3) Local management of data files

(4) A backup is a backup set, and a full backup or a level 0 incremental backup.

(5) The backup set is created on disk.

If these conditions are met, Oracle will not back up any unused blocks, and the backup will therefore occupy less space on the disk or tape.

5.1.2 RMAN Backup Compression

Rman can apply a compression algorithm to a backup set, thereby reducing the size of the backup set that Rman creates. RMAN compression can greatly reduce the size of the backup set. Sometimes, compression can be very

Effect. As in the test database, the size of the backup set image can be reduced by 70% when you use a compressed backup. If you do not configure the database to automatically compress the backup set, you can use the as compressed

Backupset parameter to create a compressed backup set. If compression is already configured and you do not want to use compression in the given backup command, you can simply use the backup as backupset parameter

5.2 Marks

You can assign one tag (tag) to each backup in Oracle. Tags can be applied to full backups, table space backups, data file backups, incremental backups, and even backup copies. Examples are as follows:

Backup database tag= ' TEST ';

Note that you use the tag parameter to mark this full backup. Each tag should be unique, and if a naming convention is not specified, RMAN uses the default convention for each backup set

Assign a tag. The same tags can be applied with multiple backups, and only the most recent backups are restored by default.

5.3 Limiting the impact of backups

To help reduce the overall i/0 impact of Rman backups on other Processes, Rman provides duration parameters for the backup command. The Duration parameter is similar to the alarm clock if the backup runs longer than the point

The scheduled duration, Rman will cancel the backup. Such as:

Backup duration 00:30 database;

Note: You cannot use the backup database plus archivelog command. Duration parameters can also be used to suppress backups. When defining a duration, you can have Rman make the following

One of the smallest of the element:

(1) Backup run time

(2) The i/0 load used by the backup

If you try to minimize the backup run time, RMAN will back up in advance at full speed. This is the default setting. Another feature of using the default minimize time parameter is that RMAN will differentiate between backed-up data

The priority of the file. The data files that were recently backed up have a lower priority, and the data files that were backed up earlier have a higher priority.

You can also have Rman attempt to distribute the backup I/O operations to various points in time over time, eliminating the overall impact of the backup on the system.

Backup duration 00:30 Minimize time database;

Backup duration 00:30 Minimize time database;

Using the duration parameter, you can instruct Rman how to handle backups that exceed the backup duration time limit. When using the partial parameter, if the backup is exceeded because the duration parameter is not held

is renewed and terminated, RMAN does not process it as a failed backup. As a result, the remaining commands in any run code block continue to execute. So, if there's a backup command next,

For example, archived redo log backups, which can be handy with this parameter. Regardless of the setting of the partial parameter, the mechanism does not complete the backup process, and Oracle will successfully complete the standby

The set is considered to be available.

5.4 Qualifying Backup set size

Backup database maxsetsize=50m tag= ' TEST ';

In this example, we set the size of the backup set to no more than 50MB. If the size of the tape is limited, or the disk can only handle a certain size of data file, yes, that's a very convenient parameter.

。 Oracle divides the backup into multiple backup sets, and each backup set does not exceed the defined maxsetsize parameter value.

However, the Maxsetsize parameter limits the total size of a single backup set. Therefore, if the data file size in the backup set exceeds the defined limit, the backup operation fails. So use this parameter

Be very careful with your numbers.

Sometimes, you can do this by using the Maxpiecesize parameter of the Allocate channel command. You can also use the Configure command to create a default limit of the size of the backup set and the size of the backup

The qualified value.

5.5 Modifying the Save policy for a backup set

We can use the Keep parameter to override the default save policy.

Backup database Keep forever;

Backup database Keep until time= ' sysdate+180 ';

In the first statement, the backup is saved forever, and the second statement saves only 180 days.

5.6 Rewrite Configure exclude command

You can configure Rman by executing the Configure exclude command, excluding data files that have not changed since the last backup. If you want to make sure Rman backs up these data files, you can

Add noexclude parameter to the backup command:

Backup database Noexclude Keep Forever tag= ' TEST ';

5.7 Checking the database for errors using the backup command

RMAN does not need to perform a backup operation to scan the database for physical and logical errors. This functionality can be achieved using the Validate parameter of the backup command. Such as:

Backup Validate database;

5.8 Skip offline, unreadable, or read-only data files

Sometimes, the data files in the database may be in a state other than online, and if the data files are read-only, you might not be able to back up these read-only data files every time you back up the database. Such as

The data files are offline or inaccessible, and the Rman backup operation fails if no special action is performed to instruct Rman to skip these missing data files. Therefore, you need to use skip

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.