ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Advanced Uses
  5. Restoring Shared Library Files – SmartRestore

Restoring Shared Library Files – SmartRestore

Many newer versions of UNIX (like System V, Release 4) use shared library files. These files contain common C-language routines that are called by most UNIX programs. Nearly every UNIX program uses the libc shared library, so this file is always active. Shared library files are normally stored in one of the library directories like /lib, /shlib or /usr/lib. Shared library filenames are often distinguished by a special suffix like “_s” or “.so” or “.so.1” (for example, /shlib/libc_s or /usr/lib/

WARNING: Serious problems can occur if you try to restore (overwrite) an active shared library file-usually your system will crash! BRU does its best to be intelligent about the way it handles restoring these types of files through the SmartRestore functionality. If a file is in use (text file busy), BRU will attempt to relocate the existing file before restoring the copy in your archive. The text busy flag and memory pointers will follow the move to the file’s new location, so your system will continue to operate. However, the old version of the in-use file will still be on the system when you next reboot.

When restoring using the SmartRestore process, BRU will examine the contents of the /etc/brusmartrest file for specific files to handle this way even if the file’s text busy flag is not set. Example entries for the /etc/brusmartrest file are:

s *.so # Be careful with shared libraries
s *.so.*
s */bru # don’t overwrite the bru program

When BRU restores a file that matches one of these specifications, the original file is moved to /usr/tmp/ and named DELETE.XXXXXX where the X’s are numbers. A shell script is created called /bru/bruremovelog that serves as both a log file of the files restored using this method and a simple script to delete the moved original files once the system is rebooted. Another way to avoid problems when restoring files, is to exclude any active shared library files using the -X option with appropriate entries in the /etc/bruxpat file. Here are two examples of exclusion patterns that can be placed in your bruxpat file:

For Mac OS X:
xs *.dylib
xs *.so
xs */bru

For System V, Release 4:
xs *.so.*
xs *.so
xs */bru

xs /shlib/*_s
xs */bru

These patterns may not be correct for your system or backup method. Please refer to your system documentation for details on the location of any shared libraries on your system.