Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » Database maintenance » Backup and data recovery » Server-side backups

 

Creating an archive backup (SQL)

An archive backup is a collection of one or more files that together contain all the required information for the backup, including the main database file, transaction logs, and dbspaces. Archive backups can only be performed as server-side backups, and can be saved to either a file or tape drive.

Prerequisites

You must have the BACKUP DATABASE and VALIDATE ANY OBJECT system privileges.

 Task
  1. Connect to the database.

  2. Validate the database.

  3. Execute a BACKUP statement to make an archive backup to tape.

    If you set ATTENDED to OFF, the backup fails if it runs out of tape or disk space. If ATTENDED is set to ON, you are prompted to take an action when there is no more space on the backup archive device.

    This backup leaves the transaction log untouched.

Results

The BACKUP statement makes an entry in the text file backup.syb. For information about the location of the backup.syb file, see SALOGDIR environment variable.

Example

The following statement makes an archive backup to the first tape drive on a Windows computer:

BACKUP DATABASE
TO '\\\\.\\tape0'
ATTENDED OFF
WITH COMMENT 'May 6 backup';

The first tape drive on Windows is \\.\tape0. Because the backslash is an escape character in SQL strings, each backslash is preceded by another.


 See also