Tuesday, May 22, 2012

RMAN Based Backup Implementations in E-Business Suite Environment




crpamc.mydomain.com – 10.10.0.161

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/amc
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/amc/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpamc
$ mkdir /u2/crpamc/archive

$ chown -Rh oraamc:oinstall /u2/crpamc/archive
$ chmod -fR 777 /u2/crpamc/archive

Setting Rights and Mounting Backup location on local crpamc.mydomain.com

chown -Rh oraeme:oinstall /export/home/oraamc/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpamc/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/amc/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/amc/amc_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/amc/snapcf_amc.f';

Scripts to Perform Database Full Backup

/export/home/oraamc/amcbkp.sh
LOG_FILE="AMCBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraamc>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile amcbkp.scr msglog amcbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraamc/amcbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/amc/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraamc:oinstall /export/home/oraamc/amcbkp.scr
bash-3.00# chown -Rh oraamc:oinstall /export/home/oraamc/amcbkp.sh

bash-3.00# chmod -fR 777 /export/home/oraamc/amcbkp.scr
bash-3.00# chmod -fR 777 /export/home/oraamc/amcbkp.sh


$  ls –lh rvf*
-rwxrwxrwx   1 oraamc   oinstall     202 May 19 15:58 amcbkp.scr
-rwxrwxrwx   1 oraamc   oinstall     325 May 19 15:55 amcbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraamc
0 0 * * 1,2,3,4,5 /export/home/oraamc/amcbkp.sh



crprvf.mydomain.com – 10.10.0.162

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/rvf
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/rvf/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crprvf
$ mkdir /u2/crprvf/archive

$ chown -Rh orarvf:oinstall /u2/crprvf/archive
$ chmod -fR 777 /u2/crprvf/archive

Setting Rights and Mounting Backup location on local crprvf.mydomain.com

chown -Rh oraeme:oinstall /export/home/orarvf/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crprvf/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/rvf/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/rvf/rvf_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/rvf/snapcf_rvf.f';

Scripts to Perform Database Full Backup

/export/home/orarvf/rvfbkp.sh
LOG_FILE="RVFBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/orarvf>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile rvfbkp.scr msglog rvfbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/orarvf/rvfbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/rvf/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh orarvf:oinstall /export/home/orarvf/rvfbkp.scr
bash-3.00# chown -Rh orarvf:oinstall /export/home/orarvf/rvfbkp.sh

bash-3.00# chmod -fR 777 /export/home/orarvf/rvfbkp.scr
bash-3.00# chmod -fR 777 /export/home/orarvf/rvfbkp.sh


$  ls –lh rvf*
-rwxrwxrwx   1 orarvf   oinstall     202 May 19 15:58 rvfbkp.scr
-rwxrwxrwx   1 orarvf   oinstall     325 May 19 15:55 rvfbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e orarvf
0 0 * * 1,2,3,4,5 /export/home/orarvf/rvfbkp.sh


crpsnt.mydomain.com – 10.10.0.163

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/snt
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/snt/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpsnt
$ mkdir /u2/crpsnt/archive

$ chown -Rh orasnt:oinstall /u2/crpsnt/archive
$ chmod -fR 777 /u2/crpsnt/archive

Setting Rights and Mounting Backup location on local crpsnt.mydomain.com

chown -Rh oraeme:oinstall /export/home/orasnt/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpsnt/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/snt/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/snt/snt_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/snt/snapcf_snt.f';

Scripts to Perform Database Full Backup

/export/home/orasnt/sntbkp.sh
LOG_FILE="SNTBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/orasnt>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile sntbkp.scr msglog sntbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/orasnt/sntbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/snt/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh orasnt:oinstall /export/home/orasnt/sntbkp.scr
bash-3.00# chown -Rh orasnt:oinstall /export/home/orasnt/sntbkp.sh

bash-3.00# chmod -fR 777 /export/home/orasnt/sntbkp.scr
bash-3.00# chmod -fR 777 /export/home/orasnt/sntbkp.sh


$  ls –lh snt*
-rwxrwxrwx   1 orasnt   oinstall     202 May 19 15:58 sntbkp.scr
-rwxrwxrwx   1 orasnt   oinstall     325 May 19 15:55 sntbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e orasnt
0 0 * * 1,2,3,4,5 /export/home/orasnt/sntbkp.sh




crpord.mydomain.com – 10.10.0.164

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/ord
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/ord/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpord
$ mkdir /u2/crpord/archive

$ chown -Rh oraord:oinstall /u2/crpord/archive
$ chmod -fR 777 /u2/crpord/archive

Setting Rights and Mounting Backup location on local crpord.mydomain.com

chown -Rh oraord:oinstall /export/home/oraord/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpord/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/ord/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/ord/ord_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/ord/snapcf_ord.f';

Scripts to Perform Database Full Backup

/export/home/oraord/ordbkp.sh
LOG_FILE="ORDBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraord>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile ordbkp.scr msglog ordbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraord/ordbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/ord/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraord:oinstall /export/home/oraord/ordbkp.scr
bash-3.00# chown -Rh oraord:oinstall /export/home/oraord/ordbkp.sh

bash-3.00# chmod -fR 777 /export/home/oraord/ordbkp.scr
bash-3.00# chmod -fR 777 /export/home/oraord/ordbkp.sh


$  ls –lh ord*
-rwxrwxrwx   1 oraord   oinstall     202 May 19 15:58 ordbkp.scr
-rwxrwxrwx   1 oraord   oinstall     325 May 19 15:55 ordbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraord
0 0 * * 1,2,3,4,5 /export/home/oraord/ordbkp.sh



crpeme.mydomain.com – 10.10.0.165

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/eme
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/eme/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpeme
$ mkdir /u2/crpeme/archive

$ chown -Rh oraeme:oinstall /u2/crpeme/archive
$ chmod -fR 777 /u2/crpeme/archive

Setting Rights and Mounting Backup location on local crpeme.mydomain.com

chown -Rh oraeme:oinstall /export/home/oraeme/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpeme/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/eme/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/eme/eme_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/eme/snapcf_eme.f';

Scripts to Perform Database Full Backup

/export/home/oraeme/emebkp.sh
LOG_FILE="EMEBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraeme>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile emebkp.scr msglog emebkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraeme/emebkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/eme/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraeme:oinstall /export/home/oraeme/emebkp.scr
bash-3.00# chown -Rh oraeme:oinstall /export/home/oraeme/emebkp.sh

bash-3.00# chmod -fR 777 /export/home/oraeme/emebkp.scr
bash-3.00# chmod -fR 777 /export/home/oraeme/emebkp.sh


$  ls –lh eme*
-rwxrwxrwx   1 oraeme   oinstall     202 May 19 15:58 emebkp.scr
-rwxrwxrwx   1 oraeme   oinstall     325 May 19 15:55 emebkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraeme
0 0 * * 1,2,3,4,5 /export/home/oraeme/emebkp.sh

No comments:

Post a Comment