Connectivity:
RMAN TARGET /
RMAN TARGET SYS/SYS123@ORCL
Configuration:
SHOW ALL;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE RETENTION POLICY TO REDUNDANCY
2;(how many backup history the repository will store)
CONFIGURE RETENTION POLICY TO RECOVERY
WINDOW OF 30 DAYS; (how many days backup history the repository will store)
CONFIGURE EXCLUDE FOR TABLESPACE USERS;
CONFIGURE EXCLUDE FOR TABLESPACE EXAMPLE;
CONFIGURE EXCLUDE FOR TABLESPACE USERS CLEAR;
CONFIGURE EXCLUDE FOR TABLESPACE EXAMPLE
CLEAR;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'F:\labs\autobakup\%F' maxpiecesize 8 G;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\app\asus\backup\%U';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\app\asus\backup\%F';
SHOW EXCLUDE;
REPORT NEED BACKUP; (What is needed to
backup)
LIST BACKUP;
LIST BACKUPSET;
LIST BACKUP RECOVERABLE;
LIST BACKUP SUMMARY;
LIST ARCHIVELOG ALL;
CROSSCHECK BACKUP; (Will check backup
expired or not)
DELETE BACKUP;
DELETE EXPIRED BACKUP;
DELETE EXPIRED ARCHIVELOG ALL;
DELETE OBSOLETE;(Will delete expired
backup)
DELETE NOPROMPT OBSOLETE;(Will delete
without giving any confirmation message)
DELETE CURRENT CONTROLFILE AND SPFILE;
DELETE ARCHIVELOG ALL;
BACKUP CURRENT CONTROLFILE;
BACKUP SPFILE;
BACKUP CURRENT CONTROLFILE TAG =
mondaypmbackup;
BACKUP CURRENT CONTROLFILE TO
'D:/.......................';
BACKUP DATABASE; (Will backup
except exclude configuration tablespace)
BACKUP DATABASE EXCLUDE; (Will backup
only configuration tablespace)
BACKUP DATABASE NOEXCLUDE; (Will backup
all tablespace)
BACKUP DATAFILE 1;
BACKUP DATABASE PLUS ARCHIVELOG;
BACKUP INCREMENTAL LEVEL 1 DATABASE; (Differential incremental)
BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
FULL DATABASE BACKUP;
RUN{
ALLOCATE CHANNEL C1 TYPE DISK;
ALLOCATE CHANNEL C2 TYPE DISK;
ALLOCATE CHANNEL C3 TYPE DISK;
BACKUP INCREMENTAL LEVEL 0 DATABASE;
RELEASE CHANNEL C1;
RELEASE CHANNEL C2;
RELEASE CHANNEL C3;
}
FULL DATABASE BACKUP (DIFFERENTIAL
INCREMENTAL);
RUN{
ALLOCATE CHANNEL C1 TYPE DISK;
ALLOCATE CHANNEL C2 TYPE DISK;
ALLOCATE CHANNEL C3 TYPE DISK;
BACKUP INCREMENTAL LEVEL 1 DATABASE;
RELEASE CHANNEL C1;
RELEASE CHANNEL C2;
RELEASE CHANNEL C3;
}
USING TAG:
RUN
{
ALLOCATE CHANNEL C1 TYPE DISK;
ALLOCATE CHANNEL C2 TYPE DISK;
ALLOCATE CHANNEL C3 TYPE DISK;
BACKUP INCREMENTAL LEVEL 0 TAG MYTAG
DATABASE;
RELEASE CHANNEL C1;
RELEASE CHANNEL C2;
RELEASE CHANNEL C3;
}
BACKUP AS BACKUPSET
FORMAT 'D:/USER_BKUP/RMAN_BACKUP.BKP'
TABLESPACE USERS;
RESTORING:
RESTORE DATABASE;
RESTORE DATABASE VALIDATE; (Will create
datafile if datafile lost)
RESTORE DATABASE FROM TAG=’MYTAG';
RESTORE TABLESPACE USRES FROM TAG='TAG20160626T102325';
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন