Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* pax usage
@ 2002-07-23  7:34 selc kar
  2002-07-25  8:48 ` selc kar
  0 siblings, 1 reply; 3+ messages in thread
From: selc kar @ 2002-07-23  7:34 UTC (permalink / raw)


Hello gurus...

My server:
ES40 2 GB RAM
2x 667 Alpha CPU
tru64Unix V5.1

Because in the future, our new unix server systems will (could!) not
be Alpha, I am trying to leave a smooth history for the future
servers.  I am trying to find a new backup tool so that historical
backups can be opened in those future systems..

We are using vdump now, but it is proprietary of Tru64.. Pax can be a
good generic backup solution..In the manuals it is said that pax
extracts archives according to the current path

According to "man pax " (last sentence)
....
Extracting Archive Files

  When the -r option is specified, but the -w option is not, the pax
command
  extracts the members of an archive file and any extended attributes
read
  from the standard input, and with pathnames matching the pattern
argument
  if one is specified. If an extracted file is a directory, the file
hierar-
  chy contained in the directory is also extracted. The extracted
files are
  created relative to the current file hierarchy.
....

But it just opens the backuped file to the original path
My command prompt is ;

/home/selcuk> pax -rv -f /dev/tape/tape0c /var/adm/lperr

it opens file in /var/adm
how can i open it in the current (./) directory..?

TIA


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pax usage
  2002-07-23  7:34 pax usage selc kar
@ 2002-07-25  8:48 ` selc kar
  2002-07-30 14:12   ` Michael Joosten
  0 siblings, 1 reply; 3+ messages in thread
From: selc kar @ 2002-07-25  8:48 UTC (permalink / raw)


Hey,
I have found the answer, I think it is like tar..

You must pax the file(s) according to current directory so that it can
be extracted to the current directory...

i.e, to pax root directory

cd /

pax -w -f /dev/tape/tape0c .

to read the file
 
pax -r -f /dev/tape/tape0c ./fileNameHERE


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pax usage
  2002-07-25  8:48 ` selc kar
@ 2002-07-30 14:12   ` Michael Joosten
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Joosten @ 2002-07-30 14:12 UTC (permalink / raw)


selc kar wrote:
> 
> Hey,
> I have found the answer, I think it is like tar..
> 
> You must pax the file(s) according to current directory so that it can
> be extracted to the current directory...
> 

Last time I used pax, there was still the '-s' option:
     -s replstr
           Modify the file or archive member names specified by the
pattern or
           file operands according to the substitution expression
replstr,
           using the syntax of the ed(1) utility regular expressions. 
The
           format of these regular expressions are:
                 /old/new/[gp]
           As in ed(1), old is a basic regular expression and new can
contain
           an ampersand (&), \n (where n is a digit) back-references, or
           subexpression matching.  The old string may also contain
<newline>
           characters.  Any non-null character can be used as a
delimiter (/
           is shown here).  Multiple -s expressions can be specified. 
The
           expressions are applied in the order they are specified on
the com-
           mand line, terminating with the first successful
substitution.  The
           optional trailing g continues to apply the substitution
expression
           to the pathname substring which starts with the first
character
           following the end of the last successful substitution. The
first
           unsuccessful substitution stops the operation of the g
option.  The
           optional trailing p will cause the final result of a
successful
           substitution to be written to standard error in the following
for-
           mat:
                 <original pathname> >> <new pathname>
           File or archive member names that substitute to the empty
string
           are not selected and will be skipped.

(cited from IRIX manpage)

So, pax -r -f /dev/tape/tape0c -s '/^\//\.&/' should extract the content
in the current directory.  Not sure, though, if the matching of
filenames now uses the original or the replaced names.
BTW, some '-b' for larger block sizes should be useful for the
impatient...

> 
> to read the file
> 
> pax -r -f /dev/tape/tape0c ./fileNameHERE

-- 
Michael Joosten, SBS C-LAB, joost@c-lab.de
Fuerstenallee 11, 33094 Paderborn, Germany
Phone: +49 5251 606127, Fax: +49 5251 606065
C-LAB is a cooperation of University Paderborn & SIEMENS


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-30 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-23  7:34 pax usage selc kar
2002-07-25  8:48 ` selc kar
2002-07-30 14:12   ` Michael Joosten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox