BACKUP ORACLE HOME AND INVENTORY - Bright DBA
How to Backup ORACLE_HOME binaries and Oracle INVENTORY ORACLE_HOME and INVENTORY need to backup before Database / OS level patching
oracle backupintermediate
by OracleDba
12 views
How to Backup ORACLE_HOME binaries and Oracle INVENTORY ORACLE_HOME and INVENTORY need to backup before Database / OS level patching
123456789101112131415161718192021
[oracle@rac1 ~]$
ps -ef | grep pmon
oracle 13474 1 0 15:29 ? 00:00:00
ora_pmon_DELL
oracle 13583 13414 0 15:30 pts/1 00:00:00 grep pmon
[oracle@rac1 ~]$
SQL>
select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DELL READ WRITE
SQL>
SQL>
shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>123456789101112131415161718192021222324252627282930313233343536
[oracle@rac1 ~]$
ps -ef | grep tns
root 15 2 0 08:32 ? 00:00:00 [netns]
oracle 13623 1 0 15:31 ? 00:00:00 /u01/app/oracle/product/11.2.0.4/bin/tnslsnr LISTENER_11G -inherit
oracle 13631 13414 0 15:32 pts/1 00:00:00 grep tns
[oracle@rac1 ~]$
lsnrctl stop LISTENER_11G
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 09-DEC-2018 15:32:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.rajasekhar.com)(PORT=1621)))
The command completed successfully
[oracle@rac1 ~]$
[oracle@rac1 ~]$
ps -ef | grep tns
root 15 2 0 08:32 ? 00:00:00 [netns]
oracle 13638 13414 0 15:32 pts/1 00:00:00 grep tns
[oracle@rac1 ~]$
[oracle@rac1 ~]$
cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=dba
[oracle@rac1 app]$
cd /u01/app/
[oracle@rac1 app]$
ls -ltr
total 8
drwxr-xr-x. 10 oracle dba 4096 Nov 7 11:33 oracle
drwxrwx---. 6 oracle dba 4096 Nov 7 20:16
oraInventory
[oracle@rac1 app]$
tar -pcvf /u02/oracle/backup/binary/Backup_OraInv.tar oraInventory
OR
tar -pczvf /u02/oracle/backup/binary/Backup_OraInv.tar oraInventory | gzip > /u02/oracle/backup/binary/Backup_OraInv.tar.gz123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
[oracle@rac1 product]$ pwd
/u01/app/oracle/product
[oracle@rac1 product]$ ls -ltr
total 12
drwxr-xr-x. 72 oracle dba 4096 Oct 21 2016 12.1.0.2
drwxr-xr-x. 78 oracle dba 4096 Dec 8 15:47
11.2.0.4 <---
drwxr-xr-x. 74 oracle dba 4096 Dec 8 19:38 12.2.0.1
[oracle@rac1 product]$
cd /u01/app/oracle/product
[oracle@rac1 product]$
nohup tar -pcvf /u02/oracle/backup/binary/oracle_home_bkup.tar 11.2.0.4 &
[1] 8848
[oracle@rac1 product]$ nohup: ignoring input and appending output to `nohup.out'
[oracle@rac1 product]$
jobs -l
[1]+ 8848 Running nohup tar -pcvf /u02/oracle/backup/binary/oracle_home_bkup.tar 11.2.0.4 &
[oracle@rac1 product]$
[oracle@rac1 product]$
ls -ltr
total 2312
drwxr-xr-x. 72 oracle dba 4096 Oct 21 2016 12.1.0.2
drwxr-xr-x. 78 oracle dba 4096 Dec 8 15:47 11.2.0.4
drwxr-xr-x. 74 oracle dba 4096 Dec 8 19:38 12.2.0.1
-rw-------. 1 oracle dba 2354978 Dec 11 17:47 nohup.out
[oracle@rac1 product]$
OR
[oracle@rac1 product]$
nohup tar -pczvf /u02/oracle/backup/binary/oracle_home_bkup.tar 11.2.0.4 | gzip > /u02/oracle/backup/binary/oracle_home_bkup.tar.gz &
[1] 10189
[oracle@rac1 product]$ nohup: ignoring input and redirecting stderr to stdout
[oracle@rac1 product]$
jobs -l
[1]+ 10188
Running
nohup tar -pczvf /u02/oracle/backup/binary/oracle_home_bkup.tar 11.2.0.4
10189 | gzip > /u02/oracle/backup/binary/oracle_home_bkup.tar.gz &
[oracle@rac1 product]$
[oracle@rac1 binary]$
ls -ltr /u02/oracle/backup/binary/oracle_home_bkup*
-rw-r--r--. 1 oracle dba 2752787212 Dec 11 18:22
/u02/oracle/backup/binary/oracle_home_bkup.tar
-rw-r--r--. 1 oracle dba 240299 Dec 11 18:22
/u02/oracle/backup/binary/oracle_home_bkup.tar.gz
[oracle@rac1 binary]$1234567891011121314151617181920212223242526
SQL>
shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
[oracle@rac1 ~]$
ps -ef | grep tns
root 15 2 0 08:32 ? 00:00:00 [netns]
oracle 13623 1 0 15:31 ? 00:00:00 /u01/app/oracle/product/11.2.0.4/bin/tnslsnr LISTENER_11G -inherit
oracle 13631 13414 0 15:32 pts/1 00:00:00 grep tns
[oracle@rac1 ~]$
lsnrctl stop LISTENER_11G
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 09-DEC-2018 15:32:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.rajasekhar.com)(PORT=1621)))
The command completed successfully
[oracle@rac1 ~]$
[oracle@rac1 ~]$
ps -ef | grep tns
root 15 2 0 08:32 ? 00:00:00 [netns]
oracle 13638 13414 0 15:32 pts/1 00:00:00 grep tns
[oracle@rac1 ~]$123456
[oracle@rac1 app]$
cd /u01/app/
[oracle@rac1 app]$
mv oraInventory
oraInventory_bkp
tar -pxvf /u02/oracle/backup/binary/Backup_OraInv.tar123456
[oracle@rac1 product]$
cd /u01/app/oracle/product
[oracle@rac1 product]$
mv 11.2.0.4
11.2.0.4_bkp
tar -pxvf /u01/app/oracle/backup/oracle_home_bkup.tarPlease to add comments
No comments yet. Be the first to comment!