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: Tar cold backups on AIX

Re: Tar cold backups on AIX

From: Chuck <chuckh_at_softhome.net>
Date: Wed, 26 Jun 2002 11:19:53 -0400
Message-ID: <afcm2q$dfs5c$1@ID-85580.news.dfncis.de>


There was a type-o in the script. The first line of the union query should say "select name from v\$datafile". The real script uses the correct query. The problem appears to be with tar either not saving or restoring the files correctly. Have you seen this before.

"Kevin Brand" <kevin.brandx_at_tel.gte.com> wrote in message news:afclii$6nj$1_at_news.gte.com...
>
>
> Your script returns something like this into the "files.dat" tar input
> file...
>
> SID_NAME_IN_ALL_CAPS
> logfile1_file_name
> ...
> logfileN_file_name
>
> You must be starting the tar command ( the script ) from the
> .../oradata/<you start your script in this dir>/SID_NAME_IN_ALL_CAPS
>
> otherwise all you are backing up and restoring is the redo. What about
> controlfiles and configuration files?
>
> -Kevin
>
> "Chuck" <chuckh_at_softhome.net> wrote in message
> news:afcho1$dcho8$1_at_ID-85580.news.dfncis.de...
> > I am having a problem restoring cold backups on AIX. The procedure I use
> to
> > create the backup is to build a flat file containing the names of all
the
> > datafiles and logfile members by querying the database. I then shut the
> > database down normally and use that file to tar (and gzip) the database.
> > I've done this hundreds of times on Solaris and SGI and have never had a
> > problem restoring. When I try to restore an AIX backup however I get the
> > following...
> >
> > Database mounted.
> > ORA-01113: file 1 needs media recovery
> > ORA-01110: data file 1: '/u500/oradata/HRUA/system01.dbf'
> >
> > If I do "recover database" (which I should NOT have to do since the
backup
> > was a clean cold backup) it starts prompting me for archive logs but the
> > database is not in archive log mode.
> >
> > Is there some problem with TARing oracle data files on AIX, or gzipping
> the
> > tar file? What's the workaround?
> >
> > Here is my backup procedure (korn shell)
> >
> > sqlplus -s "/ as sysdba" <<! > files.dat
> > set pages 0 feedback off
> > select name from v\$database
> > union all
> > select member from v\$logfile;
> > !
> > sqlplus -s "/ as sysdba" <<!
> > shutdown immediate
> > !
> > tar cvf - `cat files.dat` | gzip > coldbackup.tgz
> >
> >
> >
>
>
Received on Wed Jun 26 2002 - 10:19:53 CDT

Original text of this message

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