I am giving here super-fast RMAN backup techniques with section
size option and Big File type of Datafile.
Section Size Calculation:
In this technique we need to calculate the section size as per the
available CPU cores actual used in parallel processing.
We assuming 70 CPU Cores are available,
Total Size of Tablespace : 4754
Parallel Processes =70
4754/70=68
So we assume 66 GB as a section size
Here you need to have 70 CPU cores for parallel process of the
RMAN backup, else please adjust it accordingly as per your system CPU Cores
count.
For this size of DB it will take appx 30 min for full RMAN backup
depends on the HW configuration you are using.
In following Example we are considering Big file tablespace, if
you are using normal tablespace then you can exclude following two statements.
configure exclude for tablespace BFTS1201;
configure exclude for tablespace BFTS1201 clear;
RMAN Backup:
#!/bin/bash
srvctl status database -d DB12
srvctl stop database -d DB12
srvctl start instance -d DB12 -i DB121
rman target / log=/scratch/backup/rman_backup_DB121/DB12_`date
+%d-%m-%Y:%H:%M:%S`.log <<EOF
sql 'alter system checkpoint';
sql 'alter system checkpoint';
shutdown immediate;
startup mount;
configure exclude for tablespace BFTS1201;
backup as compressed backupset database;
configure exclude for tablespace BFTS1201 clear;
backup as compressed backupset section size 66G tablespace
BFTS1201;
alter database open;
report schema;
exit;
EOF
--Starting other Node Instance
srvctl start instance -d DB12 -i DB122
srvctl status database -d DB12
RMAN Restore
#!/bin/bash
srvctl status database -d DB12
srvctl stop database -d DB12
srvctl start instance -d DB12 -i
DB121
rman target /
log=/scratch/backup/rman_backup_DB121/DB12_restore_Section66_`date +%d%m%Y`.log
<<EOF
sql 'alter system checkpoint';
sql 'alter system checkpoint';
shutdown immediate;
startup mount;
restore section size 66G tablespace BFTS1201;
restore database skip tablespace BFTS1201;
recover database;
alter database open resetlogs;
exit;
EOF
Thanks And Regards
No comments:
Post a Comment