RMAN backup learning notes

Source: Internet
Author: User

When talking about rman, we need to talk about catalog, that is, restoring the directory. I don't think this stuff is very useful. If the database does not reach the open state, the restoring directory database cannot be connected at all. I personally recommend that you do not use the catalog Database. Of course, to fully understand rman, you still need to know what the catalog database is used for. The catalog Database is specially used by rman, used to store backup information (not backup files) and backup scripts.

If you do not need catalog, the backup information is stored in the control file, which is required for recovery.
 
Scenario 1: Use the catalog Database
 
1. Create a catalog tablespace
Create tablespace rman_ts
Datafile 'xxxxxxxx/rman_ts01.dbf'
Size 10 m;
 
2. Create an rman user
Create user rman identified by rman
Default tablespace rman_ts
Temporary tablespace temp
Quota unlimited on rman_ts
 
3. user authorization
Grant recovery_catalog_owner to rman
Grant resource, connect to rman
 
4. Create a recovery directory in the directory database
Rman catalog rman/rman
Create catalog tablespace rman_ts
 
At this time, we can use the catalog Database normally. You can perform the test.
[Oracle @ ora10 ~] $ Rman target/catalog rman/rman
Recovery Manager: Release 10.2.0.4.0-Production on Thu Mar 28 15:05:06 2013
Copyright (c) 1982,200 7, Oracle. All rights reserved.
Connected to target database: QDYX (DBID = 3280546065)
Connected to recovery catalog database
 
Scenario 2: Do not use Restore directory
 
Rman target/
 
Make a full backup
Run {
Allocate channel n1 type disk;
Allocate channel n2 type disk;
Backup as compressed backupset database
Format '/disk01/backup/ora10 _ % d _ % s _ % P ';
Release channel n1;
Release channel n2;
}
 
Incremental Backup (incremental differential backup)
Run {
Allocate channel c1 type disk;
Backup incremental level 0
Format '/disk01/backup/rmanbak/inc0 _ % u _ % t'
Database;
Release channel c1;
}
 
Back up data files
Backup datafile 8;
 
Backup tablespace
Backup tablespace users;
 
Back up archived logs
Backup archivelog all delete all input;
 
Back up databases and archive logs, and delete archive logs.
Backup as compressed backupset database plus archivelog delete all input
Format '/disk01/backup/ora10 _ % d _ % s _ % P ';
 
Note: run {} can be used to generate a piece of code, customize some parameters for backup, or use the default parameter for backup. If the backup path is not specified during backup, it is stored in the flash_recovery_area directory by default.

  • 1
  • 2
  • 3
  • Next Page

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.