The Backup utility makes a copy of the transaction log of a running IQ database, and lets you truncate the transaction log, freeing disk space and improving recovery speed, without having to stop and restart your server.
To back up an entire Sybase IQ database, always use BACKUP instead of dbbackup. BACKUP backs up all database files, and is the only way to back up the catalog store. See BACKUP statement in Chapter 1, “SQL Statements” in Reference: Statements and Options.
dbbackup [options] target-directory
Table 4-1 lists the available options for the dbbackup utility.
Option |
Description |
---|---|
@data |
Reads options from the specified environment variable or configuration file. If both exist, and share the same name, Sybase IQ uses the environment variable. For more information about configuration files, see the Installation and Configuration Guide. To protect passwords or other information in the configuration file, use the File Hiding utility (dbfhide) to obfuscate configuration file contents. See “File Hiding utility (dbfhide).” |
-c "keyword=value; ... " |
Supplies database connection parameters. If you do not specify the connection parameters, connection parameters from the SQL CONNECT environment variable are used, if set. The user ID must have DBA authority or REMOTE DBA authority. See Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1. |
-l (lowercase L) file |
Sends a live backup of the transaction log to a file. Enables a secondary system to be brought up rapidly in the event of server failure. A live backup does not terminate, but continues while the server runs. It runs until the primary server becomes unavailable. At that point, it shuts down, but the backed up log file is intact and can be used to quickly bring up a secondary system. The live backup of the transaction log is always the same length or shorter than the active transaction log. When a live backup is running and another backup restarts the transaction log (dbbackup -x), the live backup automatically truncates the live backup log and restarts the live backup at the beginning of the new transaction log. See “Live backup of transaction log” in Chapter 12, “Data Backup, Recovery, and Archiving” in the System Administration Guide: Volume 2. |
-o |
Writes output messages to the named file. |
-q |
Quiet mode — does not display output messages. This option is available only when you run this utility from a command prompt. |
-r |
Copies the old transaction log to a new name and starts a new empty log. The following steps occur:
|
-t |
Backs up only the transaction log file. This can be used as an incremental backup since the transaction log can be applied to the most recently backed up copy of the database files. |
-xo filename |
Truncate (delete and restart) the transaction log |
target-directory |
The directory to which the backup files are copied. If the directory does not exist, Sybase IQ creates it. The parent directory must exist. |
The Backup utility allows you to back up the transaction log while other applications or users are using the database. Backup file names are the same as the database file names.
The dbbackup utility truncates the database name to 70 characters and creates a target file with a truncated name. Sybase IQ uses dbbackup when synchronizing secondary servers. Due to dbbackup restrictions, database names must be less than 70 characters long.
If you have adequate disk space, use -r to preserve the existing log file under a new name and start a new empty log. If disk space is limited, use -xo instead to truncate the existing log.
Exit codes are 0 (success) or nonzero (failure).
The following Windows command backs up the transaction log from the iqdemo database running on the sample_server server into the directory iqbackup, connecting as user ID DBA with password sql:
dbbackup -c "eng=sample_server;dbn=iqdemo;uid=DBA;pwd=sql" c:\sample\iqbackup