Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: gzip syntax for cold backup

Re: gzip syntax for cold backup

From: Frank Langelage <frank_at_lafr.de>
Date: Fri, 31 Mar 2006 16:02:04 +0200
Message-ID: <494r2tFn4e3jU1@individual.net>


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 - Received on Fri Mar 31 2006 - 08:02:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US