Note : Please test below steps in your lower environment before trying in Production
Backup of GI and RDBMS home before patching
As root do it when DB instance/CRS is down :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
-- -- As root do it when DB instance/CRS is down : 1) For GRID Home : [grid@server1 ~]$ cd /u01/app/grid/product [grid@server1 product]$ ls -ltr total 4 drwxr-x---. 75 root oinstall 4096 Feb 13 02:23 12102 [grid@server1 product]$ sudo su - root cd /u01/app/grid/product tar -czvf bkup_GI_home_12102.tar.gz ./12102 2) For RDBMS Home : $ pwd /u01/app/oracle/product oracle@server1:ORCL:/u01/app/oracle/product> $ ls -ltr total 6222468 -rw-r--r--. 1 oracle oinstall 6371799040 Mar 25 23:59 12102_bkp.tar drwxr-xr-x. 72 oracle oinstall 4096 Mar 26 03:13 12102 oracle@server1:ORCL:/u01/app/oracle/product> sudo su - root cd /u01/app/oracle/product tar -czvf bkup_rdbms_home_12102.tar.gz ./12102 3) For oraInventory : /var/opt/grid/oraInventory As root : tar -czvf oraInventory_Jun27.tar.gz ./oraInventory -- -- |
Restore : If any issues and needs to restore RDBMS/GI home follow below steps :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
-- -- As Root : for GRID Home: [root@server1 product]# pwd /u01/app/grid/product mv 12102 12102_old tar zvxf bkup_GI_home_12102.tar.gz For RDBMS Home : [root@server1 product]# pwd /u01/app/oracle/product mv 12102 12102_old tar zvxf bkup_rdbms_home_12102.tar.gz -- -- |
Note : Please let me know if you have any recommendations.
Note: Please test scripts in Non Prod before trying in Production.
Druthi
Very useful information
Seeta
Amazing stuff
pandu ranga
Good information
Swapna
Useful information
Raj
Sir its a good explanation, i have one doubt when we untar the homes as root user will the permissions of the homes gets changed to root or will have the same permisions before back
Raj
Sir its a good explanation, i have one doubt when we untar the homes as root user will the permissions of the homes gets changed to root or will have the same permisions before backup
khalid
Good document,
Better to use -p as well in order to preserve permissions
-p, –preserve-permissions