Oracle's Rman Backup recovery command detailed

Source: Internet
Author: User

One, backup operations

Standby set

1. Set up a backup tag

Backup Database tag= ' full_bak1′;

Note: Each tag must be unique, and the same token can be used for multiple backups to restore only the most recent backup.

2. Set the backup set size (all the results of one backup are one backup set, be aware of the size of the backup set)

Backup Database maxsetsize=100m tag= ' datafile1′;

Note: Maxsetsize limits the size of the backup set. Therefore, it must be larger than the total data file size of the database, or it will error.

Rman-06183:datafile or datafile copy larger than maxsetsize:file# 1/DATA/ORADATA/SYSTEM01.DBF

3. Set the backup slice size (tape or file system limit)

Run {

Allocate channel C1 type disk maxpicecsize 100m format '/data/backup/full_0_%u_%t ';

Backup Database tag= ' full_0′;

Release channel C1;

}

You can set the size of each backup slice in the ALLOCATE clause to reach tape or system limits.

You can also set the backup slice size in configure.

Configure Channel device type disk maxpiecesize m;

Configure channel device type disk clear;

4. Save policy for backup set

Backup database Keep forever; – Permanent retention of backup files

Backup database Keep until Time= ' sysdate+30′; – Save backup for 30 days

5. Rewrite Configure exclude command

Backup Databas noexclude Keep forever tag= ' test backup ';

6. Check Database errors

Backup validate database;

Use Rman to scan the database for physical/logical errors and do not perform actual backups.

7. Skip offline, inaccessible or read-only files

Backup DATABASE Skip ReadOnly;

Backup database skip offline;

Backup database skip inaccessible;

Backup DATABASE ship readonly skip offline ship inaccessible;

8. Force Backup

Backup Database Force;

9. Backing up data files based on last backup time

1> only new data files that are added

Backup database not backed up;

2> Backup of data files that are not backed up in a limited time period

Backup database not backed up since Time= ' sysdate-2′;

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.