Re: RMAN "backup as copy" + until time (or COMPLETED BEFORE) Question
Date: Sun, 28 Oct 2018 22:46:35 +0800
Message-ID: <CAMNBsZt=oTydO8O4v-rimBnxXp-GQa+iE+hPJWTJQyAKChZeyA_at_mail.gmail.com>
On Sun, Oct 28, 2018 at 10:38 PM Chris Taylor < christopherdtaylor1994_at_gmail.com> wrote:
> Does anyone know how to combine the "backup as copy" PLUS an until time?
>
> Oracle 12.1.0.2
>
> Long story short:
> We are doing a process that generates a ton of archivelogs in DEST_ID=1
> and we have to save these archivelogs. (Multiple days)
>
> I need to run a periodic RMAN job to MOVE the archivelogs from DEST_ID=1
> to a backup destination WITHOUT backing them up - only MOVE them.
>
> So, enter "BACKUP AS COPY" like this:
> backup as copy archivelog like '/dpdump/archivelog/%' format
> '/HP-MSA-MIA/orabackup/archivelog/%U' delete input;
>
> (The secondary location (HP-MSA) is too slow to use for the primary
> destination but works fine as a dumping ground)
>
> However, this script wants to backup ALL the archivelogs instead of just
> the ones completed before the UNTIL TIME:
>
> /* This is a handful of logs as a test case */
> run
> {
> set until time "sysdate-1";
> backup as copy archivelog like '/dpdump/archivelog/%' format
> '/HP-MSA-MIA/orabackup/archivelog/%U' delete input;
> }
>
> Basically, what I WANT to do is this but I can't combine the 'COMPLETED
> BEFORE' with the COPY command:
>
> {rman command that does NOT work}
>
> backup as copy archivelog like '/dpdump/archivelog/%' format
> '/HP-MSA-MIA/orabackup/archivelog/%U' COMPLETED BEFORE 'SYSDATE-1' delete
> input;
>
> *RMAN-01009: syntax error: found "completed": expecting one of:
> "archivelog *
>
> Same with:
> backup as copy archivelog like '/dpdump/archivelog/%' COMPLETED BEFORE
> 'sysdate-1' format '/HP-MSA-MIA/orabackup/archivelog/%U' delete input
>
> I would have thought the 'SET UNTIL TIME' would give me what I want but
> it doesn't.
>
> Any thoughts/suggestions on how to combine the two?
>
> Thanks,
> Chris
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Oct 28 2018 - 15:46:35 CET