This Domain(Admin5.com) is for Sale:

有关Oracle数据库的备份情况

时间:2007-11-09  来源:不详  作者:迈克DB

?设置数据库为automatic archivelog mode,
#su - oracle
%svrmgrl
svrmgrl>connect internal
svrmgrl>startup mount
svrmgrl>alter database archivelog
svrmgrl>shutdown
svrmgrl>exit
%vi initoracle7.ora
加入log_archive_start = true # if you want automatic archiving
log_archive_dest = $ORACLE_HOME/dbs/arch
log_archive_format = log%s.arc
踫tart
%ps -ef|grep arch
oracle 1743 1 0 15:20:20 ? 0:00 ora_arch_oracle7
注:oracle database is in automatic archivelog mode

?full offline entire database backup, 当数据库初始完成后 这份备份是将来备份的基础。它提供了所有与数据库有关
的拷贝.
踫hut
%cp /oracle/oradata/oracle7/system.dbf
/oracle/oradata/oracle7/rbs.dbf
/oracle/oradata/oracle7/temp.dbf
/oracle/oradata/oracle7/tools.dbf
/oracle/oradata/oracle7/users.dbf
/oraclecle/app/oracle/product/7.3.2/dbs/application.dbf
/oracle/app/oracle/product/7.3.2/dbs/apptmpsp.dbf
/oracle/app/oracle/product/7.3.2/dbs/apprlbksp.dbf
/oracle/oradata/oracle7/redooracle.log
织梦好,好织梦

/oracle/oradata/oracle7/control1.ctl
/oracle/oradata/oracle7/control2.ctl
/oracle/oradata/oracle7/control3.ctl
<backup directory>
踫tart
注:以上*.dbf文件为数据文件,*.log文件为日志文件,*.ctl文件为控制文件
%exit
%tar uvf /dev/rmt/0 <backup files>
注:如果为oracle 7.2 ,则copy 相应的 data files,relog files,control files.

6.3、每天做一次 partial online with archiving backups .
#su - oracle
%svrmgrl
%svrmgrl>connect internal
%svrmgrl>alter tablespace billsp begin backup
%svrmgrl>alter tablespace billtmpsp begin backup
%svrmgrl>alter tablespace billrlbksp begin backup
%svrmgrl>alter tablespace system begin backup
%svrmgrl>alter tablespace rbs begin backup
%svrmgrl>alter tablespace temp begin backup
%svrmgrl>alter tablespace tools begin backup
%svrmgrl>alter tablespace users begin backup
%svrmgrl>host cp all datafile to the backup storage. #文件名如第一步中以.dbf结尾的.
%svrmgrl>alter tablespace billsp end backup 织梦好,好织梦
%svrmgrl>alter tablespace billtmpsp end backup
%svrmgrl>alter tablespace billrlbksp end backup
%svrmgrl>alter tablespace system end backup
%svrmgrl>alter tablespace rbs end backup
%svrmgrl>alter tablespace temp end backup
%svrmgrl>alter tablespace tools end backup
%svrmgrl>alter tablespace users end backup

做一个sql文件,如上所写.

The billing system can recover to the point of failure when the failure occur.

七、备份文件的恢复:
 7.1恢复文件:
以下是对"/etc/passwd"文件的恢复
  (、放入正确的磁带
  (、运行以下命令恢复"/etc/passwd"文件
  # rsh www mt -f /dev/rmt/0 rew
( 找到最近的磁带,向前进带到最近的"/etc/passwd",比如要找星期三的"/etc/passwd"文件,运行如下命令)
  #rsh www mt -f /dev/rmt/0n fsf 2
  # ufsrestore if www:/dev/rmt/0n
ufsrestore > ls
.:
etc/
ufsrestore > cd etc
ufsrestore > ls
./etc:
passwd
ufsrestore > add passwd

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息