Please help in ungzip a gzip archive

Hi Gurus,

I am new to SOLARIS. I have taken a backup of a directory as

# cd /backup/bkup
# gzip -crvf /u03 >> u03.gz

Now, how can i un gzip the archive.

Please help me...........................
Thanks in Advance.

Looks more like you have gzip'd the directory itself.

gzip merely does compression.

tar is the tool that combines multiple files into one archive.

You would want..

tar cf - files-to-archive | gzip >archive.tar.gz

to list them...

gunzip <archive.tar.gz | tar tf -

to untar them..

gunzip <archive.tar.gz | tar xf -

Hi Porter,

What you have suggest is very much true.

But in my case, how can i retsore the files from the archive.

When i use gzip -lt it shows

Compressed Uncompressed ratio Uncompressed Name
2051892827 2097160192 2.2% u03

Please help me, otherwise i am going to loose 52 hours of my work.

Thanks..

how did you create this archive?

The commands you list don't make sense to me.

gzip
c to stdout
r recursive
f force compression
v verbose

I would have expected it to recursively compress each file in /u03 in situ, but perhaps the "c" option caused it to write those files to stdout, but without any tar encoding it's just a stream of ones and zeros.

rule zero for making a backup is

"confirm the backup contains what you expected it to".

Yes Mr. Porter,

I've realized that i've done a big mistake, by not testing the backup.

I have some files under /u03 mount point like

/u03/proddata
/u03/archives

I tried backing them up to /backup/bkup folder as

# cd /backup/bkup
# gzip -crvf /u03 >> u03.gz

Thanks for your inputs..

Hi Mr. Porter,

I'll start doing the lost work.. Never i'll do this mistake again...

Thanks a lot..

:frowning:

:slight_smile:

Hi,

Use tar -xf file.tar

you can easily extract all the files.