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

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » Maintaining Your Database » Backup and data recovery » Backup and recovery tasks

 

Backing up a database directly to tape

An archive backup makes a copy of the database file and transaction log file in a single archive destination. Only server-side, full backups can be made in this manner. When you make an archive backup in Sybase Central, you have the option of backing up the database directly to tape or to disk.

An extension of .1 is added to the file name you specify in the Backup Database Wizard or BACKUP statement.

For more information, see Types of backup.

To make an archive backup to tape (Sybase Central)

  1. Connect to the database as a user with DBA authority.

  2. Right-click the database and choose Backup Database.

  3. Click Next.

  4. In the Which Database Do You Want To Back Up list, select the database and click Next.

  5. In the Where Do You Want To Save The Archive list, click On Tape To The Following Device.

  6. Type the location of the tape drive and click Next.

  7. In the What Would You Like The Comment To Be For The Backup field, type a comment, and then click Finish.

  8. Click Close.

To make an archive backup to tape (SQL)

  • Use the BACKUP statement, with the following clauses:

    BACKUP DATABASE
    TO archive-root
    [ ATTENDED { ON | OFF } ]
    [ WITH COMMENT comment-string ];

    If you set the ATTENDED option 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, such as replacing the tape, when there is no more space on the backup archive device.

Notes

The BACKUP statement makes an entry in the text file backup.syb, in the same directory as the server executable.

For information about restoring from an archive backup, see Restoring an archive backup.

Example

The following statement makes a 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.

The following statement makes an archive file on disk named c:\backup\archive.1.

BACKUP DATABASE
TO 'c:\\backup\\archive';