博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

山定子

最幸福的人们似乎是那些知足常乐者 ---W.R.Inge
  wxr.cublog.cn

关于作者
姓名:
职业:
年龄:
位置:
个性介绍:
声明:本博客旨在记录博主的工作心得以及与网友共享资源,请网友转贴时注明出处。由于种种原因,本博客一旦有文章转载遗漏出处时请指明,我将及时补上,并请原文作者海涵。谢谢!
|| << >> ||
我的分类


在命令行下备份、恢复井工区

在命令行下备份、恢复井工区

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、所有地震工区,以及重要的外部数据。这样,一旦出现故障,恢复起来就容易多了。
 
===========================================
LandMark二维项目的恢复方法  by shenxiangcun
http://www.agoil.cn/bbs/read.php?tid-144697-fpage-4.html
 
恢复的方法有多种,如果有了你所提的那个文件(oracle和External备份)的话,先利用landmark软件project-〉admin->file->restore恢复你的oracle ,external,然后新建一个同样名字的工区,然后再将对应的目录文件拷入就行了,如果你创建的工区和原来的名字不相同,那么你就要将备份数据目录中的有关 ps2,pd2,ln ,sm 等文件的前缀改称你新建工区的名字。这样才可以使用。
 
如果再恢复数据库后你不想创建新的工区,那么你就要将对应的备份目录拷贝到landmark的数据盘上对应的目录,一定要注意主工区目录一定要在landmark 定义的sys gloabal目录下,而且修改$OWHOME下的CONF文件夹下面的plist文件,格式参考原来文件内容。
======================================
 
参见:阿果石油网 » 软件应用 » Landmark中工区的互拷!  ---jur.zeng

发表于: 2007-10-10,修改于: 2008-02-19 16:44,已浏览493次,有评论0条 推荐 投诉


网友评论
 发表评论