Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3134178
  • 博文数量: 144
  • 博客积分: 10056
  • 博客等级: 上将
  • 技术积分: 2603
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-13 14:20
个人简介

互通有无,共同提高。

文章分类

全部博文(144)

分类: 系统运维

2007-10-10 08:20:28

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

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 []

 

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

 

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
 
恢复的方法有多种,如果有了你所提的那个文件(oracle和External备份)的话,先利用landmark软件project-〉admin->file->restore恢复你的oracle ,external,然后新建一个同样名字的工区,然后再将对应的目录文件拷入就行了,如果你创建的工区和原来的名字不相同,那么你就要将备份数据目录中的有关 ps2,pd2,ln ,sm 等文件的前缀改称你新建工区的名字。这样才可以使用。
 
如果在恢复数据库后你不想创建新的工区,那么你就要将对应的备份目录拷贝到landmark的数据盘上对应的目录,一定要注意主工区目录一定要在landmark 定义的sys gloabal目录下,而且修改$OWHOME下的conf文件夹下面的plist文件,格式参考原来文件内容。
 
#############################

 
参见:阿果石油网 ? 软件应用 ?   ---jur.zeng
 
#############################

参见本博:
 

如何把某台工作站上的Landmark工区搬到另一台工作站上

http://blog.chinaunix.net/u/28267/showart.php?id=2226072


 
Landmark工区自动备份实例
http://blog.chinaunix.net/uid-124509-id-3069622.html
阅读(7242) | 评论(0) | 转发(3) |
给主人留下些什么吧!~~