cancel
Showing results for 
Search instead for 
Did you mean: 

GNU tar

 
SOLVED
Go to solution
Jestin John Chacko
Regular Advisor

GNU tar

Dear,

I am using a rx3660 server with 11i 23
In order to take a backup of 18 GB i had installed 3 patches
1>gettext-0.17-ia64-11.23 depot
2>libiconv-1.12-ia64-11.23 depot
3>tar-1.22-ia64-11.23 depot
using swinstall -x reinstall=false -s

A}Is it the correct method to install?

B}IF its so is there any requirement of rebooting the system to get into the effect of these patches?

c} After installing all these patches can i cross the 8GB limit using the same
command tar -cvf or is there any modfification for this command as gnu came into exist?

please give me the correct format including source and destination

I am really worried with this issue can anybody help.
21 REPLIES

Re: GNU tar

First point is these are *not* patches - they are products.

a) yes thats the correct. I'm not sure you'll need the "-x reinstall=false" though, where did you get that from?

b) unlikely to require a reboot - you can check when something in a sd format depot requires a reboot by issuing:

swlist -l fileset -a is_reboot -d -s

c) depends on the default format for the build of GNU tar - you can check this by looking at the output of "tar --help" after installing. If it isn't POSIX you will need to add a "--format=posix" to your tar command. (it's the only tar format that GNU tar supports which will backup files which are larger than 8GB). I don't have a copy to try this on, but I'd expect:

/path/to/gnu/tar --format=posix -cvf /dev/rmt/0m /dir_to_backup

would work

HTH

Duncan

HTH

Duncan
Steven Schweda
Honored Contributor

Re: GNU tar

> [...] If it isn't POSIX you will need to
> add a "--format=posix" to your tar command.
> (it's the only tar format that GNU tar
> supports which will backup files which are
> larger than 8GB).

Personally, I'd trust the GNU "tar"
documentation over advice found here:

http://www.gnu.org/software/tar/manual/

which says:

[...]
The following table summarizes the
limitations of each of these formats:

Format UID File Size File Name Devn

gnu 1.8e19 Unlimited Unlimited 63

oldgnu 1.8e19 Unlimited Unlimited 63

v7 2097151 8GB 99 n/a

ustar 2097151 8GB 256 21

posix Unlimited Unlimited Unlimited Unlimited

The default format for GNU tar is defined at
compilation time. You may check it by running
tar --help, and examining the last lines of
its output. Usually, GNU tar is configured to
create archives in 'gnu' format, however,
future version will switch to 'posix'.
[...]

And for "'gnu' format", "File Size" is
"Unlimited".


> [...] can i cross the 8GB limit using the
> same command tar -cvf [...]

You can, _if_ you use the right "tar", which
could depend on your PATH. I normally build
GNU "tar" from a source kit, and install it
in /usr/local/bin, _and_ create a link there,
gtar -> tar. So, with /usr/local/bin toward
the end of my PATH, (plain) "tar" will get me
the HP-UX "tar", and "gtar" will get me GNU
"tar". I prefer to know which program I'm
running.

> I am really worried [...]

If you're _really_ worried, then run a test.
Why trust _any_ advice over reality?
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear,

1>I had tried the swlist -l fileset -a is_reboot -d -s /tmp/tar-1.22-1a64-11.23 depot

and i got the output


# tar
tar.tar-RUN false
#
2>path/to/gnu/tar --format=posix -cvf /dev/rmt/0m /dir_to_back


which path i should specify means i should provide like this
/tmp/tar --format=posix -cvf /dev/rmt/0m /dir_to_back

is it correct or i should specify a path if so how can i create it

Re: GNU tar

>1) I had tried the swlist -l fileset
>tar.tar-RUN false

This doesn't need a reboot.

>2) path/to/gnu/tar --format=posix -cvf /dev/rmt/0m /dir_to_back
>is it correct or i should specify a path if so how can i create it?

Path to what? gtar, your files to back up or the tape?

What you have is fine. And gtar will let you rename from that absolute path when you restore.
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear

still i have some problems, now i tried


tar -format=possix -cvf /dev/rmt/10mn

but its not working???

while installing the tar product 1.22 for gnu i had provided the same name tar and default is /usr/local but i didnt found it in /usr/local but in /usr/local/bin

how should i make a link with the old default tar with the new one insatalled so that i can use the above command.


please give me the correct format

Re: GNU tar

>tar -format=possix -cvf /dev/rmt/10mn
>but it's not working?

(Only one "s" in posix.)

>but in /usr/local/bin
>how should I make a link with the old default tar with the new one installed so that I can use the above command.

Just include the path of the GNU tar before the HP-UX version:
PATH=/usr/local/bin:$PATH
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear,

1>Directory checksum error.

i had tried to take backup through gnutar using
before doing this i had used mt -f rew
2>/usr/local/bin/tar -cvf /dev/rmt/11mn

but it shows an output directory checksum error

only the names of directories where shown
3>the version of tar installed is found using this

swlist -l file tar| grep -i tar

and the output was

tar 1.22 tar
tar.tar-RUN
/usr/local/bin/tar
....


please give me a solution for this problem
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear,

1>Directory checksum error.

i had tried to take backup through gnutar using
before doing this i had used mt -f rew
2>/usr/local/bin/tar -cvf /dev/rmt/11mn

but it shows an output directory checksum error

only the names of directories where shown
3>the version of tar installed is found using this

swlist -l file tar| grep -i tar

and the output was

tar 1.22 tar
tar.tar-RUN
/usr/local/bin/tar
....


please give me a solution for this problem
Steven Schweda
Honored Contributor

Re: GNU tar

> i had tried [...]

It might be helpful if you showed the actual
commands and their actual output, instead of
your (incomplete, imprecise) summary of them.

> swlist -l file tar| grep -i tar

Probably more helpful would be:

/usr/local/bin/tar --version
ls -l /dev/rmt/11mn

That's a working tape drive? "tar" actually
writes to that tape drive? (Lights flash,
tape moves, and so on?)

You tried this with some small directory,
too?
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear ,


This is the actual output i am getting.
# /usr/local/bin/tar -cvf /dev/rmt/11mn /u01
/usr/local/bin/tar: Removing leading `/' from member names
/u01/
/u01/lost+found/
/u01/ASMT_PROD_17032009.dmp
# tar -tvf /dev/rmt/11mn
Tar: blocksize = 0; broken pipe?
# mt -f /dev/rmt/11mn rew
# tar -tvf /dev/rmt/11mn
rwxr-xr-x 0/0 0 Mar 19 12:54 2009 u01/
rwxr-xr-x 0/0 0 Jan 2 18:38 2008 u01/lost+found/
rw-rw-rw- 0/3 0 Mar 18 15:35 2009 u01/ASMT_PROD_17032009.dmp
directory checksum error
#
#


#
#
# mt -f /dev/rmt/11mn rew
# tar -xvf /dev/rmt/11mn /u02/
directory checksum error


i had tried with a small file but its working properly only problem is with this file which is nearly 18 gb

Re: GNU tar

># tar -xvf /dev/rmt/11mn /u02/
>directory checksum error
>only problem is with this file which is nearly 18 gb

And you're sure it isn't a problem with the tape?
Can you put the tarfile on disk? If that fails, you may want to use a supported PAX-ENH instead of gtar.
OldSchool
Honored Contributor

Re: GNU tar

"# /usr/local/bin/tar -cvf /dev/rmt/11mn /u01
/usr/local/bin/tar: Removing leading `/' from member names
/u01/
/u01/lost+found/
/u01/ASMT_PROD_17032009.dmp
# tar -tvf /dev/rmt/11mn


OK, so you used GNU tar to write the tape and probably the *normal* tar to read it? And expected this to work?

what happens when you do:

/usr/local/bin/tar -tvf /dev/rmt/11mn

?

For what its worth, I usually rename GNU tar to gtar and then add /usr/local/bin to the path....which lets me select which tar by name.
OldSchool
Honored Contributor
Solution

Re: GNU tar

and you also *didn't* rewind the tape after writing...

normally you would use /dev/rmt/11m which would rewind on completion. Unless you omitted a step in your example, you wrote the tape, left it at the end of the archive and then tried to read it. nothing to read, so it dies.
Steven Schweda
Honored Contributor

Re: GNU tar

> And expected this to work?

Amazing, isn't it?

> and you also *didn't* rewind [...]

Ask me why I always ask to see the actual
commands used. Go ahead, ask me. I dare
you.

Re: GNU tar

>OldSchool: you also *didn't* rewind the tape after writing.

Sure jestin did, the second and third time. :-)
Only the first time was there a "broken pipe?" message.
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear.



1>is it necessary to rewind the tape before and after creation of an archive in tape,if so why we are using that?

2>is the same thing applicable while extracting files to a directory from a tape.

3>what is the correct format to rewind the tape?
is it mt -f rew

Re: GNU tar

>1) is it necessary to rewind the tape before and after creation of an archive in tape, if so why we are using that?

As OldSchool said, it depends on whether you use a no rewind tape device.

If you just put in the tape, you don't need to rewind. If you are finished you should rewind, so it ejects faster.

>2) is the same thing applicable while extracting files to a directory from a tape.

The same issues. If you just wrote a no rewind tape, you need to rewind.

>3) what is the correct format to rewind the tape?
is it mt -f rew

Yes, mt(1) says that.
Jestin John Chacko
Regular Advisor

Re: GNU tar

Now i had successfully taken the backup of 18Gb and i had restored it.thanks to all especially to u dear dennis
Jestin John Chacko
Regular Advisor

Re: GNU tar

After installing the GNU tar along with its dependencies(libiconv&gettext)the default path should be provided

/usr/local/bin/tmp -cvf dir
for backup

/usr/local/bin/tmp -tvf for viewing

enter the current directory to which the data should be restored and provide
/usr/local/bin/tmp -xvf


for any help provide

/usr/local/bin/tmp --help
OldSchool
Honored Contributor

Re: GNU tar

Jestin said: "1>is it necessary to rewind the tape before and after creation of an archive in tape,if so why we are using that?"

did you even read ( or understand ) what I posted above regarding rewind / no rewind devices

when you write your tar to something /dev/rmt/11/mn, (Note the *mn* ) it does not automatically rewind, so the tape is left where it finished writing. This can be usefull if you're going to write multiple archives to the same tape

normally you would use /dev/rmt/11m (no *n*) which would rewind on completion. The normal sequence of events to write a single archive and then read it would be:

tar -cvf /dev/rmt/11m
tar -tvf /dev/rmt/11m

if you insist on using a no-rewind device, then you need to do:

tar -cvf /dev/rmt/11mn
mt -f /dev/rmt/11mn rew
tar -tvf /dev/rmt/11mn

and use the same tar to read the tape that you used to write the tape (See my note about renaming gnu tar to gtar to eliminate confusion).
Steven Schweda
Honored Contributor

Re: GNU tar

> /usr/local/bin/tmp --help

"/usr/local/bin/tar" might work even better.
(Or visit the Web site cited a week ago.)

> did you even read ( or understand ) what I
> posted above regarding [...]

Or anything else?