Creates a client-side or a server-side backup of database files and transaction logs for running databases.
dbbackup [ options ] target-directory
Reads in options from the specified environment variable or configuration file. See Configuration files.
To protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide).
|-aw[ - ]||
Enables automatic tuning of writers, which can improve overall backup performance by increasing the number of writers. Specifying -aw- disables the automatic tuning of writers and prevents the database server from creating additional writers. The -aw and -aw- options must be used with the -s option.
|-b block-size||Specifies the maximum block size (in number of pages) to be used to transfer pages from the database server to dbbackup. The dbbackup utility tries to allocate this number of pages; if it fails, it repeatedly reduces this value by half until the allocation succeeds. The default size is 128 pages.|
Records a comment in the backup history file. For archive backups, the comment is also recorded in the archive file. The -bc option must be used with the -s option.
|-c "keyword=value; ..."||
Specifies connection parameters.
Backs up the main database files only, without backing up the transaction log file, if one exists.
|-h[ - ]||
Enables backup history, which appends a line to the backup.syb file. Specifying -h- disables backup history and prevents updates to the backup.syb file. The -h and -h- options must be used with the -s option.
Specifies how dbbackup processes the database files before writing them to the destination directory. The choice of whether to apply pre-images during a backup, or copy the checkpoint log as part of the backup, has performance implications. If the -s option is specified to perform the backup on the server, the default setting for -k is auto; otherwise, the default setting is copy.
Enables a secondary system to be brought up rapidly in the event of a server crash. A live backup does not stop. It continues running 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 bring a secondary system up quickly. See Differences between live backups and transaction log mirrors and Creating a live backup.
If you specify -l, then you cannot use -s to create an image back up on the server.
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. This option is used with -r.
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.
You can also use both the -x option and the -n option to rename the log copy. For example:
Writes output messages to the named file.
Sends formatted progress messages from the database server to the client.
The -p option is ignored unless the -s option is used to perform a server-side backup.
For information about formatted progress messages, see progress_messages option.
Suppresses output messages. This option is available only when you run this utility at a command prompt.
Renames the transaction log and starts a new transaction log. It forces a checkpoint and causes the following three steps to occur:
Creates an image backup on the server using the BACKUP DATABASE statement. If you specify the -s option, the -l option (to create a live backup of the transaction log) cannot be used. The directory specified is relative to the server's current directory, so it is recommended that you specify a full pathname. In addition, the server must have write permissions on the specified directory. When -s is specified, the Backup utility does not display progress messages and does not prompt you when it overwrites existing files. To be prompted when an attempt is made to overwrite an existing file, do not specify -s or -y. You must specify -s if you specify the -k recovery option.
Creates a backup that 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).
Waits until transactions are complete to rename or truncate the transaction log. The -wa option must be used with the -s option.
Delays the backup of the database until there are no active transactions. The -wb option must be used with the -s option.
Backs up the existing transaction log, deletes the original log, and then starts a new transaction log. Do not use this option if you are using database mirroring. See Transaction log file management in a database mirroring system.
Deletes the current transaction log and starts a new one. This operation does not perform a backup; its purpose is to free up disk space in non-replication environments. Do not use this option if you are using database mirroring. See Transaction log file management in a database mirroring system.
Using this option can result in a database that cannot be recovered from media failure. Only use this option when data loss is acceptable.
Do not use the -xo option with databases that are being replicated or synchronized. SQL Remote and MobiLink rely on transaction log information.
Creates the backup directory or replaces a previous backup file in the directory without confirmation. To be prompted when an attempt is made to overwrite an existing file, do not specify -s or -y.
Specifies the directory the backup files are copied to. If the directory does not exist, it is created. However, the parent directory must exist. By default, the Backup utility creates a client-side backup of the database files. You can specify -s to create a backup on the server using the BACKUP DATABASE statement.
You must have the BACKUP DATABASE system privilege.
The Backup utility makes a backup copy of all the files for a single database. A simple database consists of two files: the main database file and the transaction log. More complicated databases can store tables in multiple files, with each file as a separate dbspace. All backup file names are the same as the database file names. The image backup created by the Backup utility consists of a separate file for each file that is backed up.
For more information about making archive backups (a single file that contains both the database file and the transaction log), see Archive backups.
Using the Backup utility on a running database is equivalent to copying the database files when the database is not running. You can use the Backup utility to back up the database while other applications or users are using it.
If neither of the options -d or -t are used, all database files are backed up.
By default, the Backup utility creates a client-side backup of the database files. You can specify -s to create a backup on the server using the BACKUP DATABASE statement.
For information about performing server-side backups, see BACKUP statement.
Backup copies of the database and transaction log must not be changed in any way. If there were no transactions in progress during the backup, or if you specified BACKUP DATABASE WITH CHECKPOINT LOG RECOVER or WITH CHECKPOINT LOG NO COPY, you can check the validity of the backup database using read-only mode or by validating a copy of the backup database.
However, if transactions were in progress, or if you specified BACKUP DATABASE WITH CHECKPOINT LOG COPY, the database server must perform recovery on the database when you start it. Recovery modifies the backup copy, which is not desirable.
Exit codes are 0 (success) or non-zero (failure).
For more information about exit codes, see Software component exit codes.
For example, the following command backs up the sample database running on the computer named sample_host, connecting as the DBA user, into the SQLAnybackup directory:
dbbackup -c "Host=sample_host;DBN=demo;UID=DBA;PWD=sql" SQLAnybackup
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|