Re: gzip syntax for cold backup



Nick wrote:
I've completed a cold backup using the following syntax:

gzip -c 'list of DB files to be zipped' > cb_dbname_date.gz

Now when I try to refresh from cold backup, I use this syntax:

gunzip cb_dbname_date.gz -- in the current directory

The problem is that this is only creating a single *HUGE* file, instead
of decompressing to each individual db file (e.g., control01,
control02, etc....)

Can anyone please help me deflate this file back to it's original db
files?

Platform: Solaris 9
DB Version: Oracle 10g


gzip compresses file by file, it does not put them together.
So the file you get after calling gunzip is the last file you compressed.
You may use tar or cpio to put the files together and compress this.
tar -cvf - control01.dbf ... | gzip -c > cb_dbname_date.tar.gz

to see the content:
gzip -dc cb_dbname_date.tar | tar -tvf -

to extract:
gzip -dc cb_dbname_date.tar | tar -xvf -
.