- 论坛徽章:
- 0
|
急:怎样定时备份ORALCE数据库(没有磁带机)?
很多方法啊,没有磁带即可以备份到硬盘或者磁带库,没有差别啊
你所用的是冷备份吧
如果不能冷备份,用热备啊
热备份必须要开archive log mode
如果没有开
startup mount;
alter database archivelog ;
alter database open;
有两种方法,一种用rman,一种不用rman
不用rman的大致为:
备份datafile
1。alter tablespace tbls begin backup
2. cp file under tablespace tbls
3. alter tablespace tbls begin backup
重复所有的tablespace,以前好像有人写过脚本实现备份的
备份controlfile
alter database backup controlfile to trace;
or
alter database backup controlfile to ‘new fielname’;
备份archive log file,手动
用rman 备份,要新建catalog database
让后建立target database 和catalog database 之间的连接
然后用rman的命令
如
full backup script
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup full format ‘/u01/oradata/backup/full%u_%s_%p’ database
include current controlfile;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
level 0 backup script
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 0b format ‘/u01/oradata/backup/db0%u_%s_%p’
database skip readonly;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
level 1 backup script
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 1 format ‘/u01/oradata/backup/db1%u_%s_%p’
database skip readonly;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
} |
|