Exp / Expdp sebagai solusi cadangan seperti mengatakan toko onderdil mobil cadangan Anda. Secara teknis itu akan membuat Anda bangkit kembali dan berlari, tetapi itu hanya akan menyebabkan Anda sakit dan menderita.
Exp atau Expdp dapat digunakan sebagai cadangan sekunder untuk cadangan sistem file dingin atau cadangan panas atau dingin (perangkat lunak klien cadangan Oracle lainnya biasanya hanya menjalankan perintah RMAN).
Metodologi khasnya adalah sebagai berikut:
1 cold backup weekly
1 hot backup daily
Dan jika Anda benar-benar ingin berhati-hati, transpor secara berkala log redo yang diarsipkan dari server (setiap jam berfungsi) atau setel lokasi jarak jauh untuk tujuan log arsip kedua.
- RMAN * baru -
Sesi RMAN tipikal saya:
rman target=/
backup as compressed backupset database plus archivelog delete input;
delete obsolete;
exit
"Cadangkan sebagai cadangan yang dikompresi ...": Anda juga dapat melakukan gambar, yang merupakan byte untuk salinan byte dari datafile. Ini akan baik sebagai cadangan mingguan itu.
"... database ...": cukup jelas
"... plus archivelogs ...": memberi kami titik dalam pemulihan waktu (dan kloning waktu dalam titik [duplikat perintah di rman])
"... delete input": hapus archivelogs yang telah dicadangkan. Anda juga dapat mengatur ini untuk menghapus yang telah dicadangkan setidaknya dua kali, dll.
"delete obsolete": ketika Anda telah mengkonfigurasi kebijakan retensi rman Anda (milik saya adalah 5 hari), maka ini akan menghapus cadangan yang ada di luar jendela itu. Ini tidak berarti kami hanya dapat memulihkan 5 hari yang lalu. Anda seharusnya masih memiliki backup tape / off-server Anda setiap hari dari area pemulihan flash. Ini hanya berarti online Anda akan memiliki 5 hari pemulihan dan setelah itu Anda perlu mengembalikan item area pemulihan flash dari tape / backup server, kemudian mendaftarkannya dengan rman untuk menggunakannya.
Berikut ini adalah log aktual dari suatu sesi, sedikit dimodifikasi untuk jalur, dll:
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.