- Backup Commands
- Job Commands
- Copy Commands
- Reporting Commands
- Listing Commands
- Validating Commands
Backup Commands
The most important backup command is obviously the BACKUP command.
The BACKUP command allows you to back up the entire database, a tablespace, a single data file (current or a copy), control file (current or a copy), SPFILE, an archived redo log, and other backup sets.
Here are some examples showing how to use the BACKUP command:
RMAN> BACKUP DATABASE;
RMAN> BACKUP TABLESPACE users;
RMAN> BACKUP DATAFILE '/u01/oracle/product/10.2/xyz/users01.dbf';
The use of the simple BACKUP DATABASE command is the same as using the BACKUP AS BACKUPSET DATABASE command.
When you use the preceding commands, RMAN generates one or more backup sets, which are RMAN-specific logical backup units. A backup set, by default, consists of 4 or fewer data files or 16 or fewer archived logs.
Note
By default, RMAN creates all backups as backup sets, on tape or on disk.
When you use the BACKUP AS COPY version of the command, RMAN generates image copies of the files you want to back up.
For Example:
RMAN> BACKUP AS COPY DATABASE;
RMAN> BACKUP AS COPY TABLESPACE USERS;
RMAN>BACKUP AS COPY DATAFILE '/u01/oracle/product/10.2/xyz/users01.dbf';
None of the previous examples used names for the backups created by RMAN. In all such cases, RMAN assigns a default tag to the backups it creates.
You can use the TAG parameter to specify a backup tag. Here's an example, showing how to attach the tag weekly_backup to an RMAN backup:
RMAN> BACKUP DATABASE TAG = 'weekly_backup';
No comments:
Post a Comment