ArGest Backup User Guide

⌘K
  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Extract Files: T...
  5. Converting Pathnames from Absolute to Relative Form: (-PA)

Converting Pathnames from Absolute to Relative Form: (-PA)

If you specified an absolute pathname for the files you backed up (an absolute pathname is one that starts with a slash character “/”), then BRU will attempt to restore them in the root directory with exactly the same pathname. This is fine, unless you want to move the files to a different directory.

If you want to restore files with absolute form pathnames in a different directory, you must use the -PA option. The -PA option will translate the leading slash character from an absolute pathname to “./” and permit extraction into the current directory.

Here’s an example of how the -PA option is used. First we back up a file with an absolute format pathname:

bru -cvf tape0 /etc/termcap


Now we restore the file to a different location:

cd /u/mydir
bru -xv -PA -f tape0

This creates the file /u/mydir/etc/termcap. If the -PA option had not been used, the file would have been restored as /etc/termcap.

The -PA option is needed only if you created an archive with absolute pathnames. It has no effect if the archive already contains pathnames in relative format (BRU’s default mode). NOTE: To extract individual files using the -PA option, you must specify the filename without a leading “/” character. For example, if a file was archived as /usr/bin/man, the normal command to extract a single file,

bru -x /usr/bin/man

will restore the file to that exact location. The command you must use to restore the file to the current directory at the time of extraction is:

bru -x -PA usr/bin/man

Note the difference in the files argument.