- use master
- go
- dump transaction MBFEWKDB with no_log
- go
- dump transaction MBFEHISDB with no_log
- go
- use master
- go
- dump database MBFEWKDB to 'MBFEWKDB.bak'
- go
- use master
- go
- dump database MBFEHISDB to 'MBFEHISDB.bak'
- go
- use master
- go
- dump transaction MBFEWKDB with no_log
- go
- dump transaction MBFEHISDB with no_log
- go
- quit
- ------------------------------------------------------------
- use master
- go
- dump transaction DIRWAYSDB with no_log
- go
- dump transaction DISWAYSDB with no_log
- go
- use master
- go
- dump database DIRWAYSDB to 'DIRWAYSDB.bak'
- go
- use master
- go
- dump database DISWAYSDB to 'DISWAYSDB.bak'
- go
- use master
- go
- dump transaction DIRWAYSDB with no_log
- go
- dump transaction DISWAYSDB with no_log
- go
- quit
- 备份脚本;
- DATE=`date "+%Y%m%d"`
- . ~/.bash_profile
- isql -Usa -P <<!
- dump database cddb to '/home/sybase/dbbak/$DATE.cddb.bak'
- go
- dump database hddb to '/home/sybase/dbbak/$DATE.hddb.bak'
- go
- dump transaction cddb with no_log
- go
- dump transaction hddb with no_log
- go
- !
- 清理日志脚本;
- $ cat /sybase/sbin/logclear
- #!/bin/ksh
- SYBASE=/sybase
- DSQUERY=SYBASE
- PATH=$SYBASE:$SYBASE/bin:$SYBASE/install:$PATH:.
- LD_LIBRARY_PATH=/sybase/lib:$LD_LIBRARY_PATH
- export SYBASE DSQUERY PATH LD_LIBRARY_PATH
- EDITOR=vi;export EDITOR
- cat $HOME/sbin/logclear.sql |isql -Usa -P
- $ cat $HOME/sbin/logclear.sql
- use master
- go
- dump transaction MBFEWKDB with no_log
- go
- dump transaction MBFEHISDB with no_log
- go
- dump transaction DIRWAYSDB with no_log
- go
- dump transaction DISWAYSDB with no_log
- go
- 恢复SYBASE:
- isql -Usa -P <<!
- load database cddb from '/home/sybase/dbbak/$DATE.cddb.bak'
- go
- online database cddb
- go
- load database hddb from '/home/sybase/dbbak/$DATE.hddb.bak'
- go
- online database hddb
- go
- shutdown SYB_BACKUP
- go
- shutdown
- go
- !
sybase 备份和恢复
最新推荐文章于 2024-09-03 19:40:04 发布