In this article, i am going to present two different type of backups to keep forever which exempts them from the retention policy
In the present article, i am going to present the scripts to backup the database which are exempted from the retention policy and can be kept forever in the storage. These type of backups will be done immediately after certifying any training instances to refresh every week. One backup will be kept forever with no expire option and the same backup will be used to refresh the database every time.
We can have either consistant backup and in-consistant backups. Consistant backups need the database in mount stage and we can backup database with nologs option. We dont need any archive logs to recover database.
In-consistant backups are done when the database is up and running. And if we have these backups with keep forever option, we may need to keep all the archive log backups taken after the KEEP FOREVER backups were taken.
From 11g onwards, KEEP FOREVER option is improved and it only retains the archivelogs which are required to keep the online backup consistent.
FOREVER Consistant Backups:
FOREVER Backups with DB up:
First backup all the archive logs using
Hope it helps
SRI
In the present article, i am going to present the scripts to backup the database which are exempted from the retention policy and can be kept forever in the storage. These type of backups will be done immediately after certifying any training instances to refresh every week. One backup will be kept forever with no expire option and the same backup will be used to refresh the database every time.
We can have either consistant backup and in-consistant backups. Consistant backups need the database in mount stage and we can backup database with nologs option. We dont need any archive logs to recover database.
In-consistant backups are done when the database is up and running. And if we have these backups with keep forever option, we may need to keep all the archive log backups taken after the KEEP FOREVER backups were taken.
From 11g onwards, KEEP FOREVER option is improved and it only retains the archivelogs which are required to keep the online backup consistent.
FOREVER Consistant Backups:
startup mount;
run
{
allocate channel t1 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
allocate channel t2 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
allocate channel t3 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
backup as compressed backupset check logical incremental level 0 database format 'backup_%d_%I_set%s_piece%p_copy%c_%T_%U' TAG=NOEXPIRE keep forever nologs;
backup current controlfile TAG=NOEXPIRE;
backup spfile TAG=NOEXPIRE;
delete obsolete;
}
FOREVER Backups with DB up:
First backup all the archive logs using
backup archivelog all;Then execute the script :
run
{
allocate channel t1 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
allocate channel t2 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
allocate channel t3 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=/opt/app/oracle/oradba/rman/tdpo/tdpo.opt)";
backup as compressed backupset check logical incremental level 0 database format 'backup_%d_%I_set%s_piece%p_copy%c_%T_%U' plus archivelog TAG=NOEXPIRE keep forever logs;
backup current controlfile TAG=NOEXPIRE;
backup spfile TAG=NOEXPIRE;
delete obsolete;
}
Hope it helps
SRI
Post a Comment
Thank you for visiting our site and leaving your valuable comment.