Rman Incremental backup (daily comulative, hourly differential) [message #332443] |
Tue, 08 July 2008 09:32 |
riccardo
Messages: 3 Registered: July 2008
|
Junior Member |
|
|
First, sorry for my english
My question is about my backup settings
the idea is
a complete weekly backup (compressed backupset level 0)
a daily (comulative) incremental backup (same, level 1)
a hourly (differential) incremental backup (level1)
could you please tell me if the following examples will fit my needs,
thanks to you all
using crontab:
# m h dom mon dow user command
55 4 * * 7 oracle /usr/local/oracle/scripts/weekly.sh &> /usr/local/oracle/scripts/weekly.log
05 6 * * * oracle /usr/local/oracle/scripts/daily.sh &> /usr/local/oracle/scripts/daily.log
35 * * * * oracle /usr/local/oracle/scripts/hourly.sh &> /usr/local/oracle/scripts/hourly.log
for script like:
# /usr/local/oracle/scripts/weekly.sh
rman @/usr/local/oracle/scripts/weekly_full.rman LOG /usr/local/oracle/scripts/weekly_full.rman.log
# /usr/local/oracle/scripts/daily.sh
rman @/usr/local/oracle/scripts/daily_comulative.rman LOG /usr/local/oracle/scripts/daily_comulative.rman.log
# /usr/local/oracle/scripts/hourly.sh
rman @/usr/local/oracle/scripts/hourly_incremental.rman LOG /usr/local/oracle/scripts/hourly_incremental.rman.log
WEEKLY :
#*** Weekly RMAN Script weekly_full.rman
CONNECT TARGET /
#*** Weekly full controlfile backup
BACKUP AS COPY
DEVICE TYPE DISK
TAG = 'WEEKLY_CONTROLFILE'
FORMAT '/srv/oradata/backups/weekly_controlfile_%d_t%t_s%s_p%p'
CURRENT CONTROLFILE;
#*** Weekly full spfile backup
BACKUP AS COPY
DEVICE TYPE DISK
TAG = 'WEEKLY_SPFILE'
FORMAT '/srv/oradata/backups/weekly_spfile_%d_t%t_s%s_p%p'
SPFILE;
#*** Weekly full database plus archivelog backup
BACKUP CHECK LOGICAL
AS COMPRESSED BACKUPSET
INCREMENTAL LEVEL = 0
DEVICE TYPE DISK
TAG = 'WEEKLY_DATABASE'
FORMAT '/srv/oradata/backups/weekly_database_%d_t%t_s%s_p%p'
DATABASE;
#*** Weekly full archivelog backup
change archivelog all validate;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP CHECK LOGICAL
AS COMPRESSED BACKUPSET
INCREMENTAL LEVEL = 0
DEVICE TYPE DISK
TAG = 'WEEKLY_ARCHIVELOG'
FORMAT '/srv/oradata/backups/weekly_archivelog_%d_t%t_s%s_p%p'
ARCHIVELOG FROM TIME 'SYSDATE-7';
#*** Remove old backups and archivelogs
# probabile il backup dell'archivelog lo considera in delete backup,
# quindi per avere 2 copie di weekly e daily (sia bkp che arc) basta sysdate-10 (>7) a backup
# e bastera' un sysdate-3 per gli archivelog che stanno sul flash-recovery-area
# un occhio a 'LIST COPY' 'LIST ARCHIVELOG ALL' mostra lo stesso risultato, ovvero gli arc sulla flash
DELETE BACKUP COMPLETED BEFORE 'SYSDATE-10' DEVICE TYPE DISK;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-3';
#*** Maintenance steps
CROSSCHECK COPY;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED COPY;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
EXIT;
DAILY :
#*** Daily RMAN Script daily_comulative.rman
CONNECT TARGET /
#*** Daily full database backup
BACKUP CHECK LOGICAL
AS COMPRESSED BACKUPSET
INCREMENTAL LEVEL = 1 CUMULATIVE
DEVICE TYPE DISK
TAG = 'DAILY_COMULATIVE_DATABASE'
FORMAT '/srv/oradata/backups/daily_comulative_database_%d_t%t_s%s_p%p'
DATABASE;
#*** Daily full archivelog backup
change archivelog all validate;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP CHECK LOGICAL
AS COMPRESSED BACKUPSET
INCREMENTAL LEVEL = 1 CUMULATIVE
DEVICE TYPE DISK
TAG = 'DAILY_COMULATIVE_ARCHIVELOG'
FORMAT '/srv/oradata/backups/daily_comulative_archivelog_%d_t%t_s%s_p%p'
ARCHIVELOG FROM TIME 'SYSDATE-3';
#*** Maintenance steps
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED COPY;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
EXIT;
HOURLY :
#*** Hourly RMAN Script hourly_incremental.rman
CONNECT TARGET /
#*** Hourly incremental database backup
BACKUP CHECK LOGICAL
AS BACKUPSET
INCREMENTAL LEVEL 1
DEVICE TYPE DISK
TAG = 'HOURLY_INCREMENTAL_DATABASE'
FORMAT '/srv/oradata/backups/hourly_incremental_database_%d_t%t_s%s_p%p'
DATABASE;
#*** Hourly incremental archivelog backup
BACKUP CHECK LOGICAL
AS BACKUPSET
INCREMENTAL LEVEL 1
DEVICE TYPE DISK
TAG = 'HOURLY_INCREMENTAL_ARCHIVELOG'
FORMAT '/srv/oradata/backups/hourly_incremental_archivelog_%d_t%t_s%s_p%p'
ARCHIVELOG FROM TIME 'SYSDATE-1';
EXIT;
|
|
|
|
|
|
Re: Rman Incremental backup (daily comulative, hourly differential) [message #333083 is a reply to message #332470] |
Thu, 10 July 2008 08:34 |
riccardo
Messages: 3 Registered: July 2008
|
Junior Member |
|
|
Sorry for my insistance but i really would like to understand and be sure to create incremental backups of a specific backup.
the instruction "FOR RECOVER OF TAG "WEEKLY_DATABASE" should be useful to my purpose but I really can't find an example suitable to my case.
An application would be:
#*** Daily comulative database backup
BACKUP
CHECK LOGICAL
INCREMENTAL LEVEL 1
CUMULATIVE
FOR RECOVER OF TAG 'WEEKLY_DATABASE'
TAG 'DAILY_COMULATIVE_DATABASE'
DEVICE TYPE DISK
FORMAT '/srv/oradata/backups/daily_comulative_database_%d_t%t_s%s_p%p'
AS COMPRESSED BACKUPSET
DATABASE;
Clearly an incremental cumulative backup of a specific weekly backup. But after this, is it possible to do an incremental differential hourly backup froma a daily cumulative backup?
Maybe I'm doing this too much complicated and there's another suitable solution. A small hint would be really helpful and appreciated! Thanks in advance.
|
|
|