dbbackup Database Administration Utility

The dbbackup utility makes a copy of the transaction log of a running SAP Sybase IQ database.

Note: To back up an entire SAP 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.

To truncate the transaction log on a simplex or multiplex server, use the -m option in your configuration file or start_iq command. The server may be running or stopped. See Performance and Tuning > Managing System Resources > Balancing I/O > Strategic File Locations > Transaction Log.

Syntax

dbbackup [options] target-directory

Parameters

This table lists the available options for the dbbackup utility.

dbbackup options

Option

Description

@data

Reads options from the specified environment variable or configuration file. If both exist, and share the same name, SAP Sybase IQ uses the environment variable.

To protect passwords or other information in the configuration file, use the File Hiding utility (dbfhide) to obfuscate configuration file contents.

-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 the BACKUP DATABASE system privilege.

-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 Administration: Backup, Restore, and Data Recovery > Data Backup, Recovery, and Archiving > How to Back Up Databases > Types of Backups > Making a Live Backup of a Transaction Log.

-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:

  • SAP Sybase IQ copies and saves the current working transaction log to the directory specified in the command.

  • SAP Sybase IQ keeps the current transaction log in its current directory, but renames it using the format yymmddxx.log, where xx are sequential characters starting at AA and running to ZZ, and yymmdd represents the current year, month, and day. This file is then no longer the current transaction log.

  • SAP Sybase IQ generates a new transaction log file that contains no transactions. The new file has the name of the former current transaction log and becomes the current transaction log.

-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, SAP Sybase IQ creates it. The parent directory must exist.

Usage

The dbbackup 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. SAP 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).

SERVER is the default logical server for dbbackup.

Examples

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
Related reference
dbfhide Database Administration Utility
-m iqsrv16 Database Option