Re: Take the archives during the backup

From: healdv_at_googlemail.com <healdv_at_gmail.com>
Date: Sat, 28 Aug 2010 09:40:58 -0700 (PDT)
Message-ID: <158a6550-2696-480c-a2c6-07a6b82f81df_at_n3g2000yqb.googlegroups.com>



On Aug 28, 7:28 am, "bob123" <bob..._at_gmail.com> wrote:
> OK Mark thanks
> the goal is duplicate a production database
> to a test database
> my answers below
>
> <Additional infromation is necessary to properly answer your question.
> <
> <Are you using a backup set or file copies?
> backup
>
> <Did you include the archive logs as part of the backup set or not?
> Yes but this is my problem.
> To have the smallest backupset
> I would like to have only the archives
> necessary to open the copy of the database.
> I don't do delete input on the source database
> so no problem for my source database.
>
> <Are you restoring to the same or a different machine?
> to another machine
>
> <Do you use a recovery catalog?
> nocatalog
>
> <Options would include Point in Time Recovery (PITR) to a predetermined
> <SCN or timestamp or potentially you could perform a recover until
> <cancel operation.
> OK but to have the smallest backup set
> how can I only  include the archives needed to
> recover the test database.
> Taking all the archives is to big for my
> working window.
>
> Thanks again

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; Received on Sat Aug 28 2010 - 11:40:58 CDT

Original text of this message