LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 09-18-2007, 12:24 PM   #16
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492

I was expecting an error message for the first entry beacuse the name is all nulls but pax doesn't complain about it. This is strange.

Anyway, I guess you can just use pax to extract the backup instead of tar, you need to have a look at its manual page for the syntax.

You may also want to check what /usr/sfw/gtar thinks about your archive.
 
Old 09-18-2007, 12:35 PM   #17
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Quote:
I was expecting an error message for the first entry beacuse the name is all nulls but pax doesn't complain about it. This is strange.
Yes, strange, indeed. I'm afraid of tar, now, because I was just so confident that I would experience no problem with it... I had also checked largefile man page to be sure that no caveat existed. By the way, I'm slowly checking all of the files (I've to decompress them before) and let you know. I just checked the 3rd and it shows the same problem. What I did was just tar cEvf, then bzip2, then bunzip2 so I expect the problem to be tar's... Very strange indeed.

Quote:
Anyway, I guess you can just use pax to extract the backup instead of tar, you need to have a look at its manual page for the syntax.
I'm doing it know and this seems to work:
Code:
pax -r < backup.tar
I also tried gtar and it starts extracting, indeed, but issuing many warnings about unrecognized headers, which is to be expected.

Isn't it reasonably normal doing tarballs of many gigabytes?
Do you think this can be a tar bug?
 
Old 09-18-2007, 03:22 PM   #18
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I never had such an issue with tar but I usually avoid using it for complete filesystem backups as it isn't the best tool for that. If the filesystem is ufs, ufsdump is much better although non portable to another O/S, otherwise I often use cpio. "zfs export" is the right tool for ZFS.

That said, I still doubt it can be a tar bug. Perhaps your source filesystem has wierd files on it, or perhaps some short lived files disappearing.

What is the precise command you used to create the archives ?

Are you sure no error message was output during the backup ?
 
Old 09-18-2007, 03:53 PM   #19
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Quote:
I never had such an issue with tar but I usually avoid using it for complete filesystem backups as it isn't the best tool for that. If the filesystem is ufs, ufsdump is much better although non portable to another O/S, otherwise I often use cpio. "zfs export" is the right tool for ZFS.
Thanks for the suggestions, jlliagre. What I was doing was this: I had zpool with 2 disks (RAID 0) and I had 4 file systems on it. Furthermore, I had another UFS partition from which I wanted to backup a directory tree and another disk with a FAT32 on it. So, I didn't think to dump the file systems because what I wanted to do wasn't a restoring them, but reorganizing their union on appropriate ZFS file system (on a single parity RAID Z, that's why I was going to destroy the first pool).

Quote:
That said, I still doubt it can be a tar bug. Perhaps your source file system has weird files on it, or perhaps some short lived files disappearing.
The machine was isolated, so I don't think a file could disappear. Furthermore I already moved all that information from my old Linux system some time ago, with GNU tar, and I had no problem doing it.

Quote:
What is the precise command you used to create the archives ?
I did this most of the times:
tar cEvf - backup | bzip2 > backup.tar.bz2

Quote:
Are you sure no error message was output during the backup?
To say the truth I didn't checked all of the output, I just spent some minutes monitoring the beginning. But if the problem was in the first bytes, that's strange. Now I realize that I didn't check tar exit code, because when I issued echo $? I was checking bzip2 exit code, instead.

Last edited by crisostomo_enrico; 09-21-2007 at 04:21 AM.
 
Old 09-18-2007, 04:03 PM   #20
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Yes, tar error messages are often lost in the middle of quickly scolling file names. Better to either avoiding using the "v" flag or just redirecting stderr to a log file for later examination.
 
Old 09-20-2007, 10:57 AM   #21
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Thanks. I already banned "v".

By the way, 3 over 6 files were affected and I really cannot realize what's been the difference between these 3 backup and the others. Anyway, pax could extract all of the files from these broken archives and it appears as if I had lost nothing.

Thanks everybody for the help!
Enrico.
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Tar –xvf I get segmentation fault –lvt lists ok Help! Bob Ross Red Hat 0 01-27-2004 10:45 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:14 AM.

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