LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-09-2009, 01:47 AM   #1
dmac05
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
Unhappy how can I restore the backups packaged with pax.


Hi all,

I have changed my system Alpha ES40 HP Tru64Unix v5.1 to Sun Solaris V890 v5.10.
In my old system i used to backup and restore a 100 GB single file (an oracle logical backup (export) file ) to DDS4 tape driver (two DDS4 data cartridge) with pax tool as fallows:

Backup: pax –w –p e –v –x xtar –f /dev/tape/tape0c
restore: pax –rv –f /dev/tape/tape0c

These commands are working fine on the HPTru64Unix system to backup and restore from a DDS-4 data cartridge.
Now i need to restore these backups to my new system (Sun OS 10).
We have the same applications running on Sun and these commands are not working.

It fails and gives ‘invalid header and long file name errors”. I think its because there is no –x xtar option in pax command in Solaris

I also installed Linux Ubuntu 8.10 and Mandriva 2009 to my desktop, and tried to restore same backups from tape to disk, I got the same error shown below:

[root@localhost /]# pax -rv -f /dev/st0
/tmp/file100.dat
alldata.exp
pax: Invalid header, starting valid header search

I can backup and restore any file with pax tool(without –x xtar option) in Ubuntu and Mandriva. There is no –x xtar option in pax tool here too.

I used this for backup; pax –wvf /dev/st0 .
and for restore: pax -rvf /dev/st0
It has worked without problems.

Now I am trying to find whether -x xtar option is only Tru64Unix dependent or not. Is there a difference in HPTru64 from unix?
How can I restore backups packaged with xtar option to other unix derivatives especially Sun or Mandriva.

Regards
yakup
 
Old 01-09-2009, 05:44 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
When I read the manpage for pax on my SuSE system, the -x option was mentioned. However you didn't indicate what format argument you used for this option.

Code:
     -x format
             Specify the output archive format, with the default format being ustar.  pax currently supports
             the following formats:

             cpio     The extended cpio interchange format specified in the IEEE Std 1003.2 (``POSIX.2'')
                      standard.  The default blocksize for this format is 5120 bytes.  Inode and device
                      information about a file (used for detecting file hard links by this format) which may
                      be truncated by this format is detected by pax and is repaired.

             bcpio    The old binary cpio format.  The default blocksize for this format is 5120 bytes.  This
                      format is not very portable and should not be used when other formats are available.
                      Inode and device information about a file (used for detecting file hard links by this
                      format) which may be truncated by this format is detected by pax and is repaired.

             sv4cpio  The System V release 4 cpio.  The default blocksize for this format is 5120 bytes.
                      Inode and device information about a file (used for detecting file hard links by this
                      format) which may be truncated by this format is detected by pax and is repaired.

             sv4crc   The System V release 4 cpio with file crc checksums.  The default blocksize for this
                      format is 5120 bytes.  Inode and device information about a file (used for detecting
                      file hard links by this format) which may be truncated by this format is detected by
                      pax and is repaired.

             tar      The old BSD tar format as found in BSD4.3.  The default blocksize for this format is
                      10240 bytes.  Pathnames stored by this format must be 100 characters or less in length
                      (including the trailing   character, which means that filenames can have a maximum
                      length of 99 characters).  Only regular files, hard links, soft links, and directories
                      will be archived (other file system types are not supported).  For backwards compati-
                      bility with even older tar formats, a -o option can be used when writing an archive to
                      omit the storage of directories.  This option takes the form:
                            -o write_opt=nodir

             ustar    The extended tar interchange format specified in the IEEE Std 1003.2 (``POSIX.2'')
                      standard.  The default blocksize for this format is 10240 bytes.  Filenames stored by
                      this format must be 100 characters or less in length (including the trailing   charac-
                      ter, which means that filenames can have a maximum length of 99 characters).  Pathnames
                      (directorynames + filenames) stored by this format must be 250 characters or less in
                      length.

             pax will detect and report any file that it is unable to store or extract as the result of any
             specific archive format restrictions.  The individual archive formats may impose additional
             restrictions on use.  Typical archive format restrictions include (but are not limited to): file
             pathname length, file size, link pathname length, and the type of the file.
Mandriva is rpm based, and the pax package supplies only two files, so if this looks promising, you could download the SuSE package from rpm.pbone.net and install it. There could be a problem if the dependent libraries differ however.
 
Old 01-09-2009, 05:45 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Sorry, you did indicate "xtar". Do you know any more information about this format? Perhaps try restoring with the -x ustar option.

Could the problem have to due with tape handling (mt) instead?

Last edited by jschiwal; 01-09-2009 at 05:58 AM.
 
Old 01-09-2009, 07:27 AM   #4
dmac05
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
The man page of pax in HPTru64unix is:

-----------------
-x format
Specifies the output archive format. The pax command recognizes the
following formats:

cpio
Extended cpio interchange format. The default blocking value for
this format for character special archive files is 5120. Blocking
values from 512 to 32,256 in increments of 512 are supported.

xtar
Extended tar interchange format. The default blocking value for
this format for character special archive files is 10240. Blocking
values from 512 to 32,256 in increments of 512 are supported. This
option lets the user archive long file names and extended UID/GID
values.

ustar
Extended tar interchange format. This is the default output
archive format. The default blocking value for this format for
character special archive files is 10240. Blocking values from 512
to 32,256 in increments of 512 are supported.

Any attempt to append to an archive file in a format different from the
existing archive format causes the pax command to exit immediately with
a nonzero exit status.
--------------------

These commands are working fine in HPTru64.
Backup: pax –w –p e –v –x xtar –f /dev/tape/tape0c
restore: pax –rv –f /dev/tape/tape0c

I use the same tape driver and cartridges, and i can also backup and restore with pax command without –x xtar option in Mandriva and Ubuntu.

Last edited by dmac05; 01-09-2009 at 07:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No pax in Slackware? lupinix Slackware 9 04-17-2013 12:49 PM
pax versus tar ahmedb72 Solaris / OpenSolaris 1 08-22-2007 05:56 AM
PAX protection deadlinx Linux - Security 4 06-08-2007 03:51 AM
Tar won't correctly restore from incremental backups therealbeale Linux - Software 1 08-31-2006 10:02 PM
Excluding a file when using pax tobycatlin Linux - General 9 04-28-2005 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration