搜尋
首頁資料庫mysql教程探索Oracle之RMAN_06备份策略

在前几次的文章中已经谈完了备份的所有内容,但是为了更加适应企业的自动备份化需求在今天的课程中可以谈谈如何构建和规划一个可

在前几次的文章中已经谈完了备份的所有内容,但是为了更加适应企业的自动备份化需求在今天的课程中可以谈谈如何构建和规划一个可以实现自动对数据进行备份的策略,从而减轻DBA的压力以及提高数据恢复的概率。

相关阅读:

探索Oracle之RMAN_01概念

探索Oracle之RMAN_02基本使用

探索Oracle之RMAN_03非一致性备份

探索Oracle之RMAN_04非一致性备份

探索Oracle之RMAN_05增量备份

探索Oracle之RMAN_06备份策略

探索Oracle之RMAN_07恢复

1、如何制定备份策略

在制定备份策略一定要遵循可恢复性及高效性原则来制定。在制定备份策略的时候尽可能的降低磁盘开销和恢复所需的时间。

1.1通过编辑备份脚本来实现按照规则的备份:

   创建0级增量备份

   run{   

   allocate channel c1 type disk;  ----分配备份通道

   allocate channel c2 type disk;

   allocate channel c3 type disk;

   backup incremental level 0  tag'leve0' format    ----定义备份级别

   '/volume/level0/leve0%u_%s_%p' database       ----设定备份文件存储路径

   include current controlfile;                     ----同时备份控制文件

   sql 'alter system archive log current';

   backup filesperset 3 format                     ----备份归档日志

   '/volume/archiv/arch_leve0_%u_%s_%p'

   archivelog all delete input;                      ---备份完成归档日志后删除

   release channel c1;                            ---关闭通道,和上面的allocate对应。

   release channel c2;

   release channel c3;

}

创建一级增量备份

run{   

   allocate channel c1 type disk;

   allocate channel c2 type disk;

   allocate channel c3 type disk;

   backup incremental level 1 tag 'leve1' format

   '/volume/level1/leve1%u_%s_%p' database

   include current controlfile;

   sql 'alter system archive log current';

   backup filesperset 3 format

   '/volume/archiv/arch_leve1_%u_%s_%p'

   archivelog all delete input;

   release channel c1;

   release channel c2;

   release channel c3;

}

创建二级增量备份

run{   

   allocate channel c1 type disk;

   allocate channel c2 type disk;

   allocate channel c3 type disk;

   backup incremental level 2 tag 'leve1' format

   '/volume/level2/leve2%u_%s_%p' database

   include current controlfile;

   sql 'alter system archive log current';

   backup filesperset 3 format

   '/volume/archiv/arch_leve1_%u_%s_%p'

   archivelog all delete input;

   release channel c1;

   release channel c2;

   release channel c3;

    }

1.2 制定有效的计划任务(参考 中的方式):

星期

差异增量

星期天

0

星期一

1

星期二

1

星期三

1

星期四

1

星期五

2

星期六

2

[oracle@ora01scripts]$ crontab -l

 

0 2 * * 0 oraclerman target / cmdfile='/opt/data/scripts/leve0.sh'

0 2 * * 1 oraclerman target / cmdfile='/opt/data/scripts/leve1.sh'

0 2 * * 2 oraclerman target / cmdfile='/opt/data/scripts/leve1.sh'

0 2 * * 3 oraclerman target / cmdfile='/opt/data/scripts/leve1.sh'

0 2 * * 4 oraclerman target / cmdfile='/opt/data/scripts/leve1.sh'

0 2 * * 5 oraclerman target / cmdfile='/opt/data/scripts/leve2.sh'

0 2 * * 6 oraclerman target / cmdfile='/opt/data/scripts/leve2.sh'

更多Oracle相关信息见Oracle 专题页面 ?tid=12

linux

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
如何向新的MySQL用戶授予權限如何向新的MySQL用戶授予權限May 09, 2025 am 12:16 AM

TograntpermissionstonewMySQLusers,followthesesteps:1)AccessMySQLasauserwithsufficientprivileges,2)CreateanewuserwiththeCREATEUSERcommand,3)UsetheGRANTcommandtospecifypermissionslikeSELECT,INSERT,UPDATE,orALLPRIVILEGESonspecificdatabasesortables,and4)

如何在MySQL中添加用戶:逐步指南如何在MySQL中添加用戶:逐步指南May 09, 2025 am 12:14 AM

toadduserInmysqleffect和securly,跟隨台詞:1)USEtheCreateUserStattoDaneWuser,指定thehostandastrongpassword.2)GrantNecterAryAryaryPrivilegesSustherthing privilegesgeStatement,usifementStatement,adheringtotheprinciplelastprefilegege.3)

mysql:添加具有復雜權限的新用戶mysql:添加具有復雜權限的新用戶May 09, 2025 am 12:09 AM

toaddanewuserwithcomplexpermissionsinmysql,loldtheSesteps:1)創建eTheEserWithCreateuser'newuser'newuser'@''localhost'Indedify'pa ssword';。 2)GrantreadAccesstoalltablesin'mydatabase'withGrantSelectOnMyDatabase.to'newuser'@'localhost';。 3)GrantWriteAccessto'

mysql:字符串數據類型和coltrationsmysql:字符串數據類型和coltrationsMay 09, 2025 am 12:08 AM

MySQL中的字符串數據類型包括CHAR、VARCHAR、BINARY、VARBINARY、BLOB、TEXT,排序規則(Collations)決定了字符串的比較和排序方式。 1.CHAR適合固定長度字符串,VARCHAR適合可變長度字符串。 2.BINARY和VARBINARY用於二進制數據,BLOB和TEXT用於大對像數據。 3.排序規則如utf8mb4_unicode_ci忽略大小寫,適合用戶名;utf8mb4_bin區分大小寫,適合需要精確比較的字段。

MySQL:我應該在Varchars上使用什麼長度?MySQL:我應該在Varchars上使用什麼長度?May 09, 2025 am 12:06 AM

最佳的MySQLVARCHAR列長度選擇應基於數據分析、考慮未來增長、評估性能影響及字符集需求。 1)分析數據以確定典型長度;2)預留未來擴展空間;3)注意大長度對性能的影響;4)考慮字符集對存儲的影響。通過這些步驟,可以優化數據庫的效率和擴展性。

mysql blob:有什麼限制嗎?mysql blob:有什麼限制嗎?May 08, 2025 am 12:22 AM

mysqlblobshavelimits:tinyblob(255bytes),blob(65,535 bytes),中間佈洛布(16,777,215個比例),andlongblob(4,294,967,967,295 bytes).tousebl觀察:1)考慮pperformance impactsandSandStorLageBlobSextern; 2)管理backbackupsandreplication carecration; 3)usepathsinst

MySQL:自動化用戶創建的最佳工具是什麼?MySQL:自動化用戶創建的最佳工具是什麼?May 08, 2025 am 12:22 AM

自動化在MySQL中創建用戶的最佳工具和技術包括:1.MySQLWorkbench,適用於小型到中型環境,易於使用但資源消耗大;2.Ansible,適用於多服務器環境,簡單但學習曲線陡峭;3.自定義Python腳本,靈活但需確保腳本安全性;4.Puppet和Chef,適用於大規模環境,複雜但可擴展。選擇時需考慮規模、學習曲線和集成需求。

mysql:我可以在斑點內搜索嗎?mysql:我可以在斑點內搜索嗎?May 08, 2025 am 12:20 AM

是的,YouCansearchInIdeAblobInMysqlusingsPecificteChniques.1)轉換theblobtoautf-8StringWithConvertFunctionWithConvertFunctionandSearchUsiseLike.2)forCompresseBlysBlobs,useuncompresseblobs,useuncompressbeforeconversion.3)expperformance impperformance imptactSandDataEcoding.4)

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

Atom編輯器mac版下載

Atom編輯器mac版下載

最受歡迎的的開源編輯器

SublimeText3 英文版

SublimeText3 英文版

推薦:為Win版本,支援程式碼提示!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

將Eclipse與SAP NetWeaver應用伺服器整合。

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )專業的PHP整合開發工具

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。