Show TOC

Creating an Image Backup (SQL)Locate this document in the navigation structure

Use the BACKUP statement to create an image backup that consists of a copy of the database file and/or the transaction log, each as separate files.

Prerequisites

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

Procedure

  1. Connect to the database.
  2. Validate the database.
  3. Execute the following statement to make an image backup:
    BACKUP DATABASE
    DIRECTORY <directory-name>;

    This backup leaves the transaction log untouched.

Results

The BACKUP statement makes an entry in the text file backup.syb.

Example

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 'c:\\temp\\backup'
TRANSACTION LOG RENAME;