Skip to content

How to Restore Oracle Home

  • by

Suppose you already have at least one backup of Oracle home, you can restore it whenever you need it.

Restore Oracle Home

Please make sure all Oracle service are stop before doing it.

First of all, we change PWD to the upper level of ORACLE_HOME.

[root@test ~]# cd /u01/app/oracle/product/19.3.0
[root@test 19.3.0]# pwd

In Linux, we usually use tar command to backup Oracle homes.

[root@ora19c1 19.3.0]# tar -zxvf /backup/homes/DB_HOME_20220620.tar.gz > /backup/homes/DB_HOME_20220620_tar_restore.log

Files will be uncompressed to the current directory.

[root@ora19c1 19.3.0]# ll
total 4
drwxr-xr-x 74 oracle oinstall 4096 Dec 16  2020 dbhome_1
[root@ora19c1 19.3.0]# ll dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 443586008 Dec 16  2020 dbhome_1/bin/oracle

As we can see, not only ownership, permission and timestamp are preserved, but setuid and setgid are all also correctly restored.

Leave a Reply

Your email address will not be published. Required fields are marked *