Performing system-level backups, Shutting down the database – Sybase 12.4.2 User Manual

Page 411

Advertising
background image

CHAPTER 11 Backup and Data Recovery

391

The backup program passes vendor information to the third-party program
automatically. When you request a third-party backup, it places this
information in the backup header file, and writes the header file on the first tape
or disk file actually created for each archive_device you specify.

Performing system-level backups

The

BACKUP

command is the most reliable method you can use to back up IQ

data. If you are careful to follow the procedures in this section, however, you
can use system-level backups for an IQ database.

Warning!

Do not use system-level backups for backing up your IQ database

unless you follow these procedures. If you attempt to restore your IQ database
files from a system-level backup without these safeguards in place, you are
likely to cause data loss or corruption, either from activity in the database while
the system-level backup occurred, or from missing files.

Shutting down the database

Your IQ database must not be running during a system-level backup.

You must shut down your IQ database before starting the system-level backup.
You must also ensure that no one starts the IQ database until the system-level
backup is complete.

Ensuring that the
database is shut down

The file protection of the .db file is read-only when the database is shut down
cleanly, and set to read/write when the database is in use. If you are writing a
script to perform backups, it is a good idea for the script to check the access
mode of the file, to be sure that the database is shut down.

To ensure that a database remains shut down, the script can check the size of
the .iqmsg file at the start and end of the script to make sure it has not changed.
If the database was started while the script was running, the .iqmsg file will be
bigger.

Advertising