$ rman target \'sys/oracle as sysdba\'
RMAN> show all;
using target database controlfile instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/9.2.0/dbs/snapcf_HUMAN.f'; # default
RMAN> show retention policy;
RMAN> show default device type;
RMAN> show maxsetsize;
RMAN> show backup optimization;
1) Manual Channel Allocation
$mkdir $HOME/RMANBACKUP
$rman target \'sys/oracle as sysdba\'
RMAN> report need backup;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of files with less than 1 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1 0 /home/human/oradata/HUMAN/system01.dbf
2 0 /home/human/oradata/HUMAN/undotbs01.dbf
4 0 /home/human/oradata/HUMAN/drsys01.dbf
6 0 /home/human/oradata/HUMAN/indx01.dbf
8 0 /home/human/oradata/HUMAN/tools01.dbf
9 0 /home/human/oradata/HUMAN/users01.dbf
10 0 /home/human/oradata/HUMAN/xdb01.dbf
11 0 /home/human/oradata/HUMAN/nanune01.dbf
12 0 /home/human/oradata/HUMAN/isaya01.dbf
13 0 /home/human/oradata/HUMAN/query01.dbf
RMAN> RUN { ALLOCATE CHANNEL c1 TYPE disk
MAXPIECESIZE = 500M
FORMAT = '$HOME/RMANBACKUP/df_%d_%s_%p.bus';
BACKUP DATABASE; }
RMAN> list backupset of database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
2) Automatic channel Allocation
RMAN> show channel;
RMAN> configure channel device type disk
maxpiecesize 50M
format '$HOME/RMANBACKUP/df_%d_%s_%p.bus';
RMAN> show channel;
RMAN> backup database;
RMAN> list backupset of database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
RMAN> configure channel device type disk clear;
RMAN> show channel;
3) BACKUP RETENTION POLICY ¸¦ RECOVERY WINDOW 14 / REDUNDANCY 2 ·Î ¼³Á¤ÇÏ°í È®ÀÎÇÑ´Ù.
RMAN> configure channel device type disk format '$HOME/RMANBACKUP/df_%d_%s_%p.bus';
RMAN> configure retention policy to recovery window of 14 days;
RMAN> show retention policy;
RMAN> configure retention policy to redundancy 2;
RMAN> show retention policy;
RMAN> backup database;
RMAN> list backupset of database;
RMAN> report obsolete;
=> redundancy 2 À̹ǷΠ3°³ÀÇ backupsetÁß Çϳª´Â obsolute!
RMAN> delete obsolete;
=> obsolete ÀÎ °ÍÀ» OS ¹× Repository¿¡¼ »èÁ¦
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
RMAN> list backupset of database;
RMAN> delete noprompt backupset;
=> OS ¹× Repostory¿¡¼ backup ¹× ±× Á¤º¸ »èÁ¦
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
ÇÕ°è 0
host command complete
RMAN> configure retention policy clear;
RMAN> configure channel device type disk clear;
4) configure duplexd backup sets / backup optimization on
RMAN> show all;
RMAN> configure datafile backup copies for device type disk to 2; <-- duplexed backup set ±¸¼º
RMAN> configure channel device type disk format '$HOME/RMANBACKUP/df_%d_%s_%p.bus';
RMAN> backup database;
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/28/2003 12:02:51
RMAN-20039: format requires %c when duplexing
RMAN> configure channel device type disk format '$HOME/RMANBACKUP/df_%d_%s_%p_%c.bus';
RMAN> backup database;
RMAN> list backupset of database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
RMAN> show all;
RMAN> delete noprompt backupset;
RMAN> show all;
RMAN> configure channel device type disk clear;
RMAN> configure datafile backup copies for device type disk clear;
RMAN> show all;
RMAN> configure channel device type disk format '$HOME/RMANBACKUP/df_%d_%s_%p.bus';
RMAN> configure backup optimization on;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
ÇÕ°è 0
host command complete
RMAN> backup database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
ÇÕ°è 381304
-rw-r----- 1 human dba 390070272 7¿ù 28 12:15 df_HUMAN_7_1.bus
host command complete
RMAN> backup database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
ÇÕ°è 762616
-rw-r----- 1 human dba 390070272 7¿ù 28 12:15 df_HUMAN_7_1.bus
-rw-r----- 1 human dba 390078464 7¿ù 28 12:17 df_HUMAN_8_1.bus
host command complete
RMAN> backup database;
RMAN> run {host "ls -l $HOME/RMANBACKUP/";}
ÇÕ°è 1143856
-rw-r----- 1 human dba 390070272 7¿ù 28 12:15 df_HUMAN_7_1.bus
-rw-r----- 1 human dba 390078464 7¿ù 28 12:17 df_HUMAN_8_1.bus
-rw-r----- 1 human dba 390004736 7¿ù 28 12:18 df_HUMAN_9_1.bus
host command complete
RMAN> list backupset 7;
5) REPORT
RMAN> report need backup redundancy 1; <-- 1¹úÀÌ ÀÖ¾î¾ß Çϴµ¥ ¾ø¾î¼ backupÀÌ ÇÊ¿äÇÑ °Í ¹¹³Ä?
RMAN> report need backup redundancy 3;
--> 3¹úÀÌ ÀÖ¾î¾ß Çϴµ¥ ¾ø¾î¼ backupÀÌ ÇÊ¿äÇÑ °Í ¹¹³Ä?
RMAN> report need backup days 1;
--> ÃÖ±Ù 1ÀÏ µ¿¾È backupÀÌ ¾ÈµÈ °Í
RMAN> delete nopormpt backupset;
RMAN> delete noprompt backupset;
RMAN> report need backup days 1;
RMAN> configure backup optimization clear;
RMAN> configure channel device type disk clear;
RMAN> backup tablespace users;
RMAN> show all;
|