在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
一、单独备份 复制代码 代码如下: run{ allocate channel c1 type disk; backup full tag ‘dbfull' format ‘/backup/full%u_%s_%p' database include current controlfile; sql ‘alter system archive log current'; #在数据库进行全备份完成之后,需要执行该条命令将当前日志归档,备份归档日志时应该包括最后生成的归档 backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset 3设定每个备份集里文件不超过3个 archivelog all delete input; #备份归档可选,可以单独定期备份 release channel c1; } 二、增量备份 复制代码 代码如下: run{ allocate channel c1 type disk; backup incremental level 0 tag ‘db0' format ‘/backup/db0%u_%s_%p'database include current controlfile; ; sql 'alter system archive log current';#在数据库进行全备份完成之后,需要执行该条命令将当前日志归档,备份归档日志时应该包括最后生成的归档 backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset 3设定每个备份集里文件不超过3个 archivelog all delete input; #备份归档可选,可以单独定期备份 release channel c1; } 2、1级备份脚本 复制代码 代码如下: run{ allocate channel c1 type disk; backup incremental level 1 tag ‘db1' format ‘/backup/db1%u_%s_%p' database skip readonly include current controlfile; backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset设定每个备份集里文件不超过3个 archivelog all delete input; #备份归档可选,可以单独定期备份 release channel c1; } |
请发表评论