Forum Stats

  • 3,825,196 Users
  • 2,260,479 Discussions
  • 7,896,435 Comments

Discussions

rman archivelog frequently

user12019606
user12019606 Member Posts: 4 Blue Ribbon
edited Jul 30, 2020 12:59PM in Recovery Manager (RMAN)

hi gurus

i have a question for you.

would you please how often need i to do a rman backup of archivelogs?

what's the best practice?

every night i run a full rman backup. and only one rman backup of archives at 11am.

thanks in advance for your help.

user12019606

Best Answer

  • CristianR-Oracle
    CristianR-Oracle Member Posts: 497 Employee
    edited Jul 29, 2020 5:59AM Answer ✓

    There is no general rule - this depends on many factors such as:

    - the amount of redo generated per day

    - the space available

    - the size of the archives

    Usually every 4 - 6 hours will be a starting point if you can not afford to keep the archivelogs on disk for a longer period.

    Also you need to take into consideration the amount of archives generated - a huge number will eventually cause performance issues - RMAN will need to check a large number of objects (resync).

    Regards,

    Cristian

    user12019606

Answers

  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Jul 29, 2020 1:04AM

    Every RMAN backup of a running database will require archivelogs to recover the database. Please see the Oracle documentation about RMAN fundamentals to understand consistent and inconsistent backups. I suggest you do the following:

    RMAN> backup as compressed backupset incremental level 0 database plus archivelog delete input;

  • CristianR-Oracle
    CristianR-Oracle Member Posts: 497 Employee
    edited Jul 29, 2020 5:59AM Answer ✓

    There is no general rule - this depends on many factors such as:

    - the amount of redo generated per day

    - the space available

    - the size of the archives

    Usually every 4 - 6 hours will be a starting point if you can not afford to keep the archivelogs on disk for a longer period.

    Also you need to take into consideration the amount of archives generated - a huge number will eventually cause performance issues - RMAN will need to check a large number of objects (resync).

    Regards,

    Cristian

    user12019606
  • user12019606
    user12019606 Member Posts: 4 Blue Ribbon
    edited Jul 29, 2020 9:05AM

    thanks a lot for your help!!

  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Jul 29, 2020 9:51AM

    When I compare "every night i run a full rman backup. and only one rman backup of archives at 11am" with "Usually every 4 - 6 hours will be a starting point if you can not afford to keep the archivelogs on disk for a longer period", then I don't think this is a good advice.

    If you have to move archivelogs every 4 to 6 hours you are not only in troubled waters, but you may also not be able to recover the database using the last backup. Hence I believe that "backup database plus archivelog", which includes a backup of the current redo log after backup is the better solution and assurance you will be able to restore and recover your last backup.

  • CristianR-Oracle
    CristianR-Oracle Member Posts: 497 Employee
    edited Jul 30, 2020 10:13AM

    How exactly backing up the archivelogs will get in "troubled waters" and "you may also not be able to recover the database using the last backup".

    Having the archivelogs on disk and backing them up and deleting them from the original location does not affect the recovery of the database.

    Having the archivelogs on disk will be faster for recovery.

    Backing them and removing them from disk will still let you recover the database - the information about the backups will be in the controlfile record sections/recovery catalog views.

  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Jul 30, 2020 12:59PM
    How exactly backing up the archivelogs will get in "troubled waters" and "you may also not be able to recover the database using the last backup".

    If you need to backup every 4 to 6 hours to address space issues, then I'd say you are in troubled waters. Doing a full database backup while the database is open isn't good enough to recover the database in case you lose all data. You will also need the archivelog during and right after backup to recover the database. This is what rman "backup database plus archivelog" will accomplish. You will not be able to recover using your last backup if you backup archivelogs some time after your database and lose archivelogs inbetween.