Automatic backup script of Sybase ASE on UNIX & Linux

Source: Internet
Author: User
Tags sybase

The following operations are performed by Sybase users:

Create a script file, such as/Sybase/script/dump. Sh.
The category is as follows:
$ Cat dump. Sh
/Sybase/OCS-12_5/bin/iSQL-USA-P ********-s ******-I/Sybase/script/dump. SQL-O/sybse/script/dump. log
MV/caiwubackup/backup/cwbase1.bak/caiwubackup/backup/cwbase1 _ 'date + % Y % m % d '. bak (Note: 'is the key that is in the upper left corner of the keyboard with a wavy line, not a single quotation mark)
MV/caiwubackup/backup/cwbase2.bak/caiwubackup/backup/cwbase2 _ 'date + % Y % m % D'. Bak
MV/caiwubackup/backup/cwbase3.bak/caiwubackup/backup/cwbase3 _ 'date + % Y % m % D'. Bak
MV/caiwubackup/backup/cwmaster. bak/caiwubackup/backup/cwmaster _ 'date + % Y % m % D'. Bak
MV/caiwubackup/backup/master. bak/caiwubackup/backup/Master _ 'date + % Y % m % d'. Bak

Create a script dump. SQL in the same directory
The category is as follows:
$ Cat dump. SQL
Dump database cwbase1 to "/caiwubackup/backup/cwbase1.bak"
Go
Dump database cwbase2 to "/caiwubackup/backup/cwbase2.bak"
Go
Dump database cwbase3 to "/caiwubackup/backup/cwbase3.bak"
Go
Dump database cwmaster to "/caiwubackup/backup/cwmaster. Bak"
Go
Dump database master to "/caiwubackup/backup/master. Bak"
Go

Develop a regular plan to back up the database at every night
$ Crontab-e
30 23 ***/Sybase/script/dump. Sh

Modify the Database Name and path based on the actual situation of your local machine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.