Contents Index Backing up a database using the dbbackup command-line utility The Collation utility

ASA Database Administration Guide
  Database Administration Utilities
    The Backup utility
      Backing up a database using the dbbackup command-line utility

Backup utility options

Directory    The directory to which the backup files are copied. If the directory does not exist, it is created. However, the parent directory must exist.

Connection parameters (-c)    For a description of the connection parameters, see Connection parameters. If the connection parameters are not specified, connection parameters from the SQLCONNECT environment variable are used, if set. The user ID must have DBA authority or REMOTE DBA authority.

For example, the following command backs up the asademo database running on the server sample_server, connecting as user ID DBA with password SQL, into the asabackup directory:

dbbackup -c "eng=sample_server;dbn=asademo;uid=DBA;pwd=SQL" asabackup

Backup main database only (-d)    Back up the main database files only, without backing up the transaction log file or a write file, if one exists.

Live backup (-l lower-case L)    This option is provided to enable a secondary system to be brought up rapidly in the event of a server crash. A live backup does not terminate, but continues running while the server runs. It runs until the primary server crashes. At that point, it is shut down, but the backed up log file is intact and can be used to bring a secondary system up quickly.

Change backup transaction log naming convention (-n)    This option is used in conjunction with -r. It changes the naming convention of the backup transaction log file to yymmddxx.log, where xx are sequential letters ranging from AA to ZZ and yymmdd represents the current year, month and day.

The backup copy of the transaction log file is stored in the directory specified in the command, and with the yymmddxx.log naming convention. This allows backups of multiple versions of the transaction log file to be kept in the same backup directory.

The two-digit year notation does not cause any year 2000 problems. The names are used solely for identification, not for ordering.

You can also use the both the -x option and the -n option to rename the log copy. For example

DBBACKUP -x -n

Log output messages to file (-o)    Write output messages to the named file.

Operate quietly (-q)    Do not display output messages. This option is available only when you run this utility from the command prompt.

Rename and start new transaction log (-r)    This option forces a checkpoint and the following three steps to occur:

  1. The current working transaction log file is copied and saved to the directory specified in the command.

  2. The current transaction log remains in its current directory, but is renamed using the format yymmddxx.log, where xx are sequential characters starting at AA and running through to ZZ, and yymmdd represents the current year, month and day. This file is then no longer the current transaction log.

  3. A new transaction log file is generated that contains no transactions. It is given the name of the file that was previously considered the current transaction log, and is used by the database server as the current transaction log.

Back up the transaction log file only (-t)    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 file(s).

Back up the database write file only (-w)    For a description of database write files, see The Write File utility.

Delete and restart the transaction log (-x)    Back up the existing transaction log, then delete the original log and start a new transaction log. This option causes the backup to wait for a point when all transactions from all connections are committed.

Delete and restart the transaction log without a backup (-xo)    Delete the current transaction log and start a new one. This operation does not carry out a backup; its purpose is to free up disk space in non-replication environments.

Operate without confirming actions (-y)    Choosing this option creates the backup directory or the replacement of a previous backup file in the directory without confirmation.


Contents Index Backing up a database using the dbbackup command-line utility The Collation utility