切换到宽版
  • 3484阅读
  • 3回复

在命令行下备份、恢复井工区 [复制链接]

上一主题 下一主题
离线山定子
 
发帖
193
财富
390
威望
26
交易币
0
只看楼主 倒序阅读 使用道具 0楼 发表于: 2007-12-04 | 石油求职招聘就上: 阿果石油英才网
— 本帖被 坐看云起 从 软件应用 移动到本区(2011-09-19) —
在命令行下备份、恢复井工区

Backing Up Projects Using a Command Line Utility 用命令行程序备份井工区

owbackup

The owbackup program is a command line utility that allows you to back up the database tables in an OpenWorks project to a disk file.

External files are not backed up, and external devices are not available. owbackup can be run from any command line interface using the arguments shown below. The program will work both with and without X running.

To run owbackup as a cron job, you must first set OWHOME, ORACLE_HOME, and ORACLE_SID. OWSYSSID also must be set if it is not correctly set in $OWHOME/conf/lgcenv.cf.

Usage:

owbackup <project_name> <backup_file_name>

Arguments:

Examples:

UNIX:

$OWHOME/bin/owbackup TESTDATA $HOME/backup/TESTdata.dmp

$OWHOME/bin/owbackup WERTZ /backup/WERTZ-’date +”%d-%b-%y”’

单位机器上的实例:
blade{owuser:/home/OpenWorks/bin}% owbackup HJQ /home4/hjq_backup/HJQ.dmp
HJQ: project backup successful
blade{owuser:/home/OpenWorks/bin}%

Windows:

%OWHOME%\bin\owbackup TESTDATA D:\backups\TESTdata.dmp

project name: the name of the project to back up

backup file name: the name of the backup file

owbackup-all

The owbackup-all program is a command line utility that allows you to back up all of the OpenWorks project in a directory to which you have manage access to a disk file. External files are not backed up, and external devices are not available.

owbackup-all backs up each project in the specified directory using a file name consisting of the project name and an extension.

owbackup-all can be run from any command line interface using the arguments shown below. The program will work both with and without X running.

To run owbackup-all as a cron job, you must first set OWHOME, ORACLE_HOME, and ORACLE_SID. OWSYSSID also must be set if it is not correctly set in $OWHOME/conf/lgcenv.cf.

Usage:

owbackup-all <directory_name> [<extension>]

Arguments:

Examples:

UNIX:

$OWHOME/bin/owbackup-all /pa/backups

$OWHOME/bin/owbackup-all /export/home/backups ow987.bkup

Windows:

%OWHOME%\bin\owbackup-all D:\backups ow987.bkup

directory name: the directory where the backup file will be created

extension: the extension of the backup file; optional;

.bkup will be used if no argument is provided

Restoring Using a Command Line Utility 用命令行程序恢复井工区

The owrestore program is a command line utility that allows you to restore the database tables in an OpenWorks project that have been backed up to a disk file. External files are not restored, and external devices are not available.

owrestore can be run from any command line interface using the arguments shown below. The program will work both with and without X running.

Usage:

owrestore <project name> <sid> <size in MB> <backup file name>

Arguments:

Examples:

UNIX:

$OWHOME/bin/owrestore TESTDATA owstar 100 $HOME/backup/TESTdata.dmp

$OWHOME/bin/owrestore WERTZ owwertz 200 /backup/WERTZ-’date +”%d-%b-%y”’

*******************

单位机器上的实例:
blade{owuser:/home/OpenWorks/bin}% owrestore HJQ owblade 400 /home4/hjq_backup/HJQ.dmp
HJQ: project restore successful
blade{owuser:/home/OpenWorks/bin}%

************************
Windows:

%OWHOME%\bin\owrestore TESTDATA owst 100 D:\backup\TESTdata.dmp

project name: the name of the project to restore

sid: the Oracle instance to restore the project to

size: the size of the OpenWorks project to create in Mb

backup file name: the name of the backup file

*****
通常,应首选Landmark图形界面进行井工区的备份与恢复操作,尤其当做恢复试验时,可以直接检查出备份文件是否有效。如果使用的是在命令行下操作,在做恢复试验时,当系统给出某某project restore successful时,一定要打开工区管理菜单,看看恢复的井工区是否上去了,如果没上去的话,说明这个备份文件存在错误或者是无效的,就要用前一个有效的备份来恢复井工区。这种错误很多是由于错误的断层数据造成的。

为保证数据的安全与完整性,同时备份整个 /home目录,OpenWorks、oracle、master、所有地震工区,以及重要的外部数据。这样,一旦出现故障,恢复起来就容易多了。
1条评分
坐看云起 财富 +20 分享技术 2007-12-04
评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线wxstone
发帖
184
财富
230
威望
5
交易币
0
只看该作者 1楼 发表于: 2008-04-09 | 石油求职招聘就上: 阿果石油英才网
thank you~~
离线onephone
发帖
53
财富
100
威望
1
交易币
0
只看该作者 2楼 发表于: 2011-06-08 | 石油求职招聘就上: 阿果石油英才网
牛!很好。需要这方面的知识!谢谢!
离线heraldic
发帖
129
财富
71
威望
3
交易币
0
只看该作者 3楼 发表于: 2011-08-23 | 石油求职招聘就上: 阿果石油英才网
这仅仅是备份了控制文件呀?莫非用的是R5000?

网站事务咨询:QQ:1392013 | 26189883
阿果石油网为免费个人网站,为石油人提供免费的在线即时技术交流场所,拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论和行为!
如有言论或会员共享的资料涉及到您的权益,请立即通知网站管理员,本站将在第一时间给予配合处理,谢谢!