Embedded Database Maintenance
295
n
ov
do
cx (e
n)
16
Ap
ril 20
10
34.3 Backing Up the Embedded Sybase SQL
Anywhere Database
The embedded Sybase SQL Anywhere database can be backed up to a directory on the local
machine or to a network location.
Section 34.3.1, “Backing Up the Embedded Sybase SQL Anywhere Database on a Windows or
Linux Server,” on page 295
Section 34.3.2, “Backing up the Embedded Sybase SQL Anywhere Database Running on a
Windows Server to a Network Location on a Remote Windows Machine,” on page 297
Section 34.3.3, “Backing up the Embedded Sybase SQL Anywhere Database Running on a
Linux Server to a Network Location on a Remote Linux Machine,” on page 299
34.3.1 Backing Up the Embedded Sybase SQL Anywhere
Database on a Windows or Linux Server
1
Store the ZENworks administrator name and password by entering the following command at
the command prompt:
zman admin-store-credential administrator
If you do not store the credentials, you must enter the ZENworks administrator name and
password for each zman command.
You can immediately back up the embedded Sybase SQL Anywhere database or schedule the
backup to run at a specific time. To back up the embedded Sybase SQL Anywhere database
immediately, continue with
Step 2
. To schedule the backup to run at a specific time, skip to
Step 3
.
2
(Conditional) To immediately back up the embedded Sybase SQL Anywhere database to a
directory on the database server, enter the following command at the command prompt:
zman database-backup
complete_path_of_the_backup_directory_on_database_server
For example, to back up the database to the
c:\dbbackup
directory on a Windows database
server, execute
zman database-backup c:\dbbackup
. To back up the database to the
/
root/dbBackup
directory on a Linux database server, execute
zman database-backup /
root/dbBackup
.
3
(Conditional) To schedule the backup to run at a specific time every day or on specific days of
a month, you need to create a schedule file and run it.
3a
Create a schedule file with the Create event,
backupschedule.sql
, with the following
contents:
CREATE EVENT
backup_schedule_name
SCHEDULE
specify_the_schedule
A sample schedule file to back up the database at a 11 p.m. every day is as follows:
CREATE EVENT ZENDBBackup
SCHEDULE
START TIME '11:00 PM' EVERY 24 HOURS