Re: Take the archives during the backup

From: Vinni <healdv_at_gmail.com>
Date: Mon, 30 Aug 2010 07:41:28 -0700 (PDT)
Message-ID: <b9137208-2dd7-4b22-bd82-f22c3c095fe3_at_j8g2000yqd.googlegroups.com>



On Aug 29, 11:51 pm, John Hurley <hurleyjo..._at_yahoo.com> wrote:
> heald:
>
> > Using RMAN the most practical and safest approach to me would be to
> > backup all the archives that have not been backed up, then backup the
> > database plus the archives logs and then you would just copy the files
> > from the time of the second backup which you could get from the
> > listing the backups to know which files to copy and you still have
> > your archives backed up from before.
>
> > Something like:
>
> > SQL 'ALTER SYSTEM CHECKPOINT'';
> > SQL 'ALTER SYSTEM SWITCH LOGFILE'';
> > backup archivelog all;
> > SQL 'ALTER SYSTEM CHECKPOINT'';
> > backup database plus archivelog;
>
> If you go down this path you probably want to do the backup database
> then switch archivelogs then backup the archivelogs.
>
> You want to make sure you have an archivelog after the backup in other
> words.

RMAN automatically switches them out making sure you have all the logs used during the backup(well its supposed to), however i've been using this particular backup script below for years, tested it countless times and had to depend on backups taken with it on several occasions and I put the archive log backup separately for some reason which may be the same reason your talking about, despite oracle saying the plus archivelog option should work.

:

connect target /
run
{
crosscheck archivelog all;
crosscheck backup;
crosscheck copy;
backup database;
backup archivelog all not backed up 2 times; restore database validate;
delete noprompt archivelog all completed before 'SYSDATE -7'; delete noprompt obsolete;
sql "create pfile from spfile";
sql "alter database backup controlfile to trace"; }

If that's the case i'de change the original script to I posted to this to make sure im using stuff i've tested myself for time:

SQL 'ALTER SYSTEM CHECKPOINT'';
SQL 'ALTER SYSTEM SWITCH LOGFILE'';
backup archivelog all;
SQL 'ALTER SYSTEM CHECKPOINT'';
backup database;
backup archivelog all not backed up 2 times; Received on Mon Aug 30 2010 - 09:41:28 CDT

Original text of this message