This topic describes a backup that leaves the transaction log untouched. For information about other transaction log management options when making a backup, see BACKUP statement.
The BACKUP statement makes an entry in the text file backup.syb that is stored in the same directory as the database server executable.
Use the following clauses to execute a backup statement:
BACKUP DATABASE DIRECTORY directory-name; |
For information about recovering from an image backup, see Restore from an image backup.
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 when there is no more space on the backup archive device.
For information about recovering from an archive backup, see Restore from an archive backup.
The following statement makes an image backup of the current database and the transaction log, saves them to different files, and renames the existing transaction log.
BACKUP DATABASE DIRECTORY 'd:\\temp\\backup' TRANSACTION LOG RENAME; |
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.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |