Exp / Expdp come soluzione di backup è come dire che il negozio di ricambi auto è la tua automobile di backup. Tecnicamente ti farà tornare indietro e correre, ma non ti causerà altro che dolore e sofferenza.
Exp o Expdp possono essere utilizzati come backup secondario per backup a freddo del filesystem o backup a caldo o freddo rman (altri software client di backup Oracle di solito eseguono solo i comandi RMAN).
La metodologia tipica sarebbe la seguente:
1 cold backup weekly
1 hot backup daily
E se vuoi davvero essere prudente, trasporta periodicamente i log di ripristino ripristinati dal server (ogni ora funziona) o imposta una posizione remota per una seconda destinazione del registro di archivio.
- RMAN * nuovo -
La mia tipica sessione RMAN:
rman target=/
backup as compressed backupset database plus archivelog delete input;
delete obsolete;
exit
"Backup come set di backup compresso ...": puoi anche fare un'immagine, che è un byte per la copia byte dei file di dati. Questo sarebbe buono come quel backup settimanale.
"... database ...": abbastanza ovvio
"... plus archivelogs ...": ci dà il recupero point in time (e clonazione point in time [comando duplicato in rman])
"... elimina input": elimina gli archivi di cui è stato eseguito il backup. Puoi anche impostarlo per eliminare quelli di cui è stato eseguito il backup almeno due volte, ecc.
"elimina obsoleto": una volta configurato il criterio di conservazione di rman (il mio è di 5 giorni), verranno eliminati i backup esterni a quella finestra. Questo non significa che possiamo recuperare solo 5 giorni fa. Dovresti comunque avere quotidianamente i backup su nastro / off-server dell'area di ripristino flash. Significa solo che online avrai 5 giorni di recupero e successivamente dovrai ripristinare gli elementi dell'area di ripristino flash dal backup su nastro / off-server, quindi registrarli con rman per poterli utilizzare.
Ecco un registro reale di una sessione, leggermente modificato per il percorso, ecc:
oracle@prodserver[PROD]$ rman target=/
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Jan 5 21:00:00 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: PROD (DBID=randomnumber)
RMAN> backup
2> as compressed backupset
3> database
4> include current controlfile
5> plus archivelog delete input;
6> backup spfile;
7> delete obsolete;
8>
Starting backup at 05-JAN-11
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=291 devtype=DISK
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=743 recid=743 stamp=739623589
input archive log thread=1 sequence=744 recid=744 stamp=739623940
input archive log thread=1 sequence=745 recid=745 stamp=739624712
input archive log thread=1 sequence=746 recid=746 stamp=739625380
input archive log thread=1 sequence=747 recid=747 stamp=739659606
channel ORA_DISK_1: starting piece 1 at 05-JAN-11
channel ORA_DISK_1: finished piece 1 at 05-JAN-11
piece handle=/u03/oraflash/PROD/backupset/2011_01_05/o1_mf_annnn_TAG20110105T210008_6lb8kb4o_.bkp tag=TAG20110105T210008 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:26
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_743_6l95ckxx_.arc recid=743 stamp=739623589
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_744_6l95plo2_.arc recid=744 stamp=739623940
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_745_6l96gpok_.arc recid=745 stamp=739624712
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_746_6l973l32_.arc recid=746 stamp=739625380
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_747_6lb8k57v_.arc recid=747 stamp=739659606
Finished backup at 05-JAN-11
Starting backup at 05-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u02/oradata/PROD/system01.dbf
input datafile fno=00005 name=/u02/oradata/PROD/software.dbf
input datafile fno=00003 name=/u02/oradata/PROD/sysaux01dbf
input datafile fno=00002 name=/u02/oradata/PROD/undotbs01.dbf
input datafile fno=00004 name=/u02/oradata/PROD/users.dbf
channel ORA_DISK_1: starting piece 1 at 05-JAN-11
channel ORA_DISK_1: finished piece 1 at 05-JAN-11
piece handle=/u03/oraflash/PROD/backupset/2011_01_05/o1_mf_nnndf_TAG20110105T210135_6lb8n0y4_.bkp tag=TAG20110105T210135 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 05-JAN-11
channel ORA_DISK_1: finished piece 1 at 05-JAN-11
piece handle=/u03/oraflash/PROD/backupset/2011_01_05/o1_mf_ncsnf_TAG20110105T210135_6lb8qblm_.bkp tag=TAG20110105T210135 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 05-JAN-11
Starting backup at 05-JAN-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=748 recid=748 stamp=739659803
channel ORA_DISK_1: starting piece 1 at 05-JAN-11
channel ORA_DISK_1: finished piece 1 at 05-JAN-11
piece handle=/u03/oraflash/PROD/backupset/2011_01_05/o1_mf_annnn_TAG20110105T210323_6lb8qf3l_.bkp tag=TAG20110105T210323 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u03/oraflash/PROD/archivelog/2011_01_05/o1_mf_1_748_6lb8qcrr_.arc recid=748 stamp=739659803
Finished backup at 05-JAN-11
Starting backup at 05-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 05-JAN-11
channel ORA_DISK_1: finished piece 1 at 05-JAN-11
piece handle=/u03/oraflash/PROD/backupset/2011_01_05/o1_mf_nnsnf_TAG20110105T210329_6lb8qlnm_.bkp tag=TAG20110105T210329 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 05-JAN-11
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 5 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 55 30-DEC-10
Backup Piece 55 30-DEC-10 /u03/oraflash/PROD/backupset/2010_12_30/o1_mf_nnndf_TAG20101230T210026_6ktg9v8w_.bkp
Backup Set 56 30-DEC-10
Backup Piece 56 30-DEC-10 /u03/oraflash/PROD/backupset/2010_12_30/o1_mf_ncsnf_TAG20101230T210026_6ktgdvnt_.bkp
Backup Set 57 30-DEC-10
Backup Piece 57 30-DEC-10 /u03/oraflash/PROD/backupset/2010_12_30/o1_mf_annnn_TAG20101230T210204_6ktgdy5j_.bkp
Backup Set 58 30-DEC-10
Backup Piece 58 30-DEC-10 /u03/oraflash/PROD/backupset/2010_12_30/o1_mf_nnsnf_TAG20101230T210210_6ktgf3pz_.bkp
Backup Set 59 31-DEC-10
Backup Piece 59 31-DEC-10 /u03/oraflash/PROD/backupset/2010_12_31/o1_mf_annnn_TAG20101231T210008_6kx2ob5r_.bkp
deleted backup piece
backup piece handle=/u03/oraflash/PROD/backupset/2010_12_30/o1_mf_nnndf_TAG20101230T210026_6ktg9v8w_.bkp recid=55 stamp=739141227
deleted backup piece
backup piece handle=/u03/oraflash/PROD/backupset/2010_12_30/o1_mf_ncsnf_TAG20101230T210026_6ktgdvnt_.bkp recid=56 stamp=739141323
deleted backup piece
backup piece handle=/u03/oraflash/PROD/backupset/2010_12_30/o1_mf_annnn_TAG20101230T210204_6ktgdy5j_.bkp recid=57 stamp=739141326
deleted backup piece
backup piece handle=/u03/oraflash/PROD/backupset/2010_12_30/o1_mf_nnsnf_TAG20101230T210210_6ktgf3pz_.bkp recid=58 stamp=739141331
deleted backup piece
backup piece handle=/u03/oraflash/PROD/backupset/2010_12_31/o1_mf_annnn_TAG20101231T210008_6kx2ob5r_.bkp recid=59 stamp=739227610
Deleted 5 objects
Recovery Manager complete.