How to change the home directory of the Oracle Secure Backup (OSB) to its default location (/usr/local/oracle/backup)

Question: How to change the home directory of the Oracle Secure Backup (OSB) to its default location, which is /usr/local/oracle/backup?

1. Stop the daemons

# obctl stop
Oracle Secure Backup Service Daemon has been stopped.
# ps -ef | grep ob
root 22892 18172 0 18:14:41 pts/1 0:00 grep ob
#

2. Edit /etc/obconfig to reflect the new location:

# more /etc/obconfig
ob dir : /usr/local/oracle/backup-move
temp dir : /usr/tmp
admin dir : /usr/local/oracle/backup-move/admin
local db dir : /usr/etc/ob
version : 12.1.0.3.0
#

3. Move the directory to the new location

# mv /usr/local/oracle/backup /usr/local/oracle/backup-move

4. Remove & recreate the links in /usr/bin to point to the new location:

# ls -l ob*
lrwxrwxrwx 1 root root 55 Jan 27 17:35 obaddinghostname -> /usr/local/oracle/backup/install/tools/obaddinghostname
lrwxrwxrwx 1 root root 33 Jan 27 17:35 obcm -> /usr/local/oracle/backup/bin/obcm
lrwxrwxrwx 1 root root 44 Jan 27 17:35 obctl -> /usr/local/oracle/backup/install/tools/obctl
lrwxrwxrwx 1 root root 32 Jan 27 17:35 obt -> /usr/local/oracle/backup/bin/obt
lrwxrwxrwx 1 root root 34 Jan 27 17:35 obtar -> /usr/local/oracle/backup/bin/obtar
lrwxrwxrwx 1 root root 35 Jan 27 17:35 obtool -> /usr/local/oracle/backup/bin/obtool
# rm ob*
# ln -s /usr/local/oracle/backup-move/install/tools/obaddinghostname obaddinghostname
# ln -s /usr/local/oracle/backup-move/bin/obcm obcm
# ln -s /usr/local/oracle/backup-move/install/tools/obctl obctl
# ln -s /usr/local/oracle/backup-move/bin/obt obt
# ln -s /usr/local/oracle/backup-move/bin/obtar obtar
# ln -s /usr/local/oracle/backup-move/bin/obtool obtool

5. Remove & recreate the /etc/ob* links to reflect the new path (retain /etc/obconfig!):

# ls ob*
obconfig obcopy obmediamgr obproxyd obrobotd observiced
# ls -latr ob*
lrwxrwxrwx 1 root root 39 Jan 27 17:35 observiced -> /usr/local/oracle/backup/etc/observiced
lrwxrwxrwx 1 root root 37 Jan 27 17:35 obrobotd -> /usr/local/oracle/backup/etc/obrobotd
lrwxrwxrwx 1 root root 37 Jan 27 17:35 obproxyd -> /usr/local/oracle/backup/etc/obproxyd
lrwxrwxrwx 1 root root 39 Jan 27 17:35 obmediamgr -> /usr/local/oracle/backup/etc/obmediamgr
lrwxrwxrwx 1 root root 35 Jan 27 17:35 obcopy -> /usr/local/oracle/backup/etc/obcopy
-rw-r--r-- 1 root root 173 Feb 13 18:15 obconfig
# rm obse* obro* obpro* obmed* obcop*
# ln -s /usr/local/oracle/backup-move/etc/observiced observiced
# ln -s /usr/local/oracle/backup-move/etc/obrobotd obrobotd
# ln -s /usr/local/oracle/backup-move/etc/obproxyd obproxyd
# ln -s /usr/local/oracle/backup-move/etc/obmediamgr obmediamgr
# ln -s /usr/local/oracle/backup-move/etc/obcopy obcopy

6. Fix the shared library files using ldconfig for linux:

- edit /etc/ld.so.conf and correct the paths to OSB libraries. - run /sbin/ldconfig:

# /sbin/ldconfig
# obctl start
Oracle Secure Backup Service Daemon has been started.

7. Login to obtool and check to make sure functionality is as expected (try a restore, a backup, check your volumes, schedules, etc)