Home » RDBMS Server » Backup & Recovery » what is the consequences of adding a plus archivelog and delete in oracle suggested backup (12.1.0.2 redhat 7)
what is the consequences of adding a plus archivelog and delete in oracle suggested backup [message #675779] Thu, 18 April 2019 12:19 Go to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear all,

from https://docs.oracle.com/database/121/ADMQS/GUID-D77B0526-13F6-4570-9C74-6436B76DEA43.htm#GUID-D77B0526-13F6-4570-9C74-6436B76DEA43

RUN {
 ALLOCATE CHANNEL disk_iub DEVICE TYPE DISK;
 RECOVER COPY OF DATABASE WITH TAG daily_iub;
 BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG daily_iub DATABASE;
}
exit
EOF

why isn't archivelog got backup and deleted? if archivelog is not backup and deleted wouldn't one day archivelog space be used up?

also what will happen if i do the following:

RUN {
 ALLOCATE CHANNEL disk_iub DEVICE TYPE DISK;
 RECOVER COPY OF DATABASE WITH TAG daily_iub;
 BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG daily_iub DATABASE plus archivelog delete input;
}

exit

many thanks in advance
Re: what is the consequences of adding a plus archivelog and delete in oracle suggested backup [message #675780 is a reply to message #675779] Thu, 18 April 2019 15:58 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Don't do that. You are conflating two requirements: maintaining a copy of the database, and managing archivelogs. There is no connection between the two.

You need a completely separate command to back up the database and archivelogs.
Re: what is the consequences of adding a plus archivelog and delete in oracle suggested backup [message #675781 is a reply to message #675780] Fri, 19 April 2019 11:59 Go to previous messageGo to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear John,

http://www.snapdba.com/2013/03/incrementally-updated-image-copy-backups-with-rman/#.XLn7gegzY2w


run {
      recover copy of database with tag 'SNAPDB_INCR_BACKUP' until time 'SYSDATE-7';
      backup incremental level 1 for recover of copy with tag 'SNAPDB_INCR_BACKUP' database;
      backup tag 'SNAPDB_INCR_BACKUP' archivelog all not backed up delete all input;
      delete noprompt obsolete device type disk;
    }

for my case


RUN {
 ALLOCATE CHANNEL disk_iub DEVICE TYPE DISK;
 RECOVER COPY OF DATABASE WITH TAG daily_iub;
 BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG daily_iub DATABASE;
backup tag 'daily_iub' archivelog all not backed up delete all input;
}


You are conflating two requirements: maintaining a copy of the database, and managing archivelogs. There is no connection between the two.
can you explain to me what you mean? aren't we suppose to have both a copy of the database and backupset of archivelog, controlfile and spfile and delete the archivelog when archivelog are backed up?

I encounter long backup time when I run the above script for the 2nd time, so I suspect it could be my script causing the problem.

thanks a lot!
Re: what is the consequences of adding a plus archivelog and delete in oracle suggested backup [message #675782 is a reply to message #675781] Fri, 19 April 2019 12:23 Go to previous messageGo to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear John

from https://oracle-base.com/articles/misc/incrementally-updated-image-copy-backups


RUN {
  RECOVER COPY OF DATABASE WITH TAG 'mydb_incr_backup' UNTIL TIME 'SYSDATE-7';
  DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
  BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'mydb_incr_backup' DATABASE;
  BACKUP DEVICE TYPE DISK TAG 'mydb_incr_backup' ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT;
  DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
}

The effect of this is that you will permanently have a 7 day recovery window with a 7 day old level 0 backup and 6 level 1 incremental backups.

however if I remove the SYSDATE-7

RUN {
RECOVER COPY OF DATABASE WITH TAG 'mydb_incr_backup'
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'mydb_incr_backup' DATABASE;
BACKUP DEVICE TYPE DISK TAG 'mydb_incr_backup' ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
}

this means that I cannot restore database 7 days ago?

many thanks in advance!
Re: what is the consequences of adding a plus archivelog and delete in oracle suggested backup [message #675831 is a reply to message #675782] Mon, 22 April 2019 18:54 Go to previous message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear all, I the effect of adding UNTIL TIME 'SYSDATE - 7' is clearly stated. https://oracle-base.com/articles/misc/incrementally-updated-image-copy-backups

I should not have ask this question of adding until TIME.

I've check google the meaning of
conflating=>combine (two or more sets of information, texts, ideas, etc.) into one.

it is not the same as conflicting

https://docs.oracle.com/database/121/RCMRF/rcmsynta006.htm#RCMRF107

PLUS ARCHIVELOG

Includes archived redo log files in the backup (see Example 2-13). Causes RMAN to perform the following steps:

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Run the BACKUP ARCHIVELOG ALL command. If backup optimization is enabled, then RMAN only backs up logs that have not yet been backed up.

Back up the files specified in the BACKUP command.

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Back up any remaining archived redo log files. If backup optimization is not enabled, then RMAN backs up the logs generated in step 1 plus all the logs generated during the backup.


Is there any issue of backing as backupset of a incremental level 1 database and at the same time backing up archivelog.

Thanks
Previous Topic: Doubt about what I realy need....
Next Topic: Including Archive logs in Controlfile manually
Goto Forum:
  


Current Time: Thu Mar 28 13:51:38 CDT 2024