backupFile

backupFile(backupDir:       String;
           verifyChecksums: Boolean;
           compress:        Boolean;
           overwriteDest:   Boolean);

The database must be in backup state (that is, the online file backup operation must be bracketed by a beginBackup and commitBackup transaction pair).

The backupFile method of the DbFile class initiates a back up of the physical database file to the directory specified in the backupDir parameter. (The backup directory must be a valid directory on the database server.) This method executes on the database server node, and is implemented and executed by the database engine. The backup process performs various consistency checks similar to a database certify, to ensure the integrity of the backup.

Set the verifyChecksums parameter to true if you want checksums verified in the backed up file. Checksum verification is performed in a separate pass of the backed up file immediately after the copy phase. A checksum analysis of your backed up database files verifies that the files have not been corrupted by a hardware or environmental problem during the backup process. You should perform a separate checksum analysis of any backup that has been moved across media, especially if transferred across a network.

Set the compress parameter to true if you want to compress backed up data. You can compress data in a checked or an unchecked backup.

Set the overwriteDest parameter to true if you want to allow file backups to overwrite existing files in the destination backup directory. When this parameter is false, an exception is raised if an existing file is detected.

The code fragment in the following example shows the use of the backupFile method.

if not dbFile.excludeFromBackup then
    dbFile.backupFile(null,      // use default directory
                      true,      // verify checksums during backup
                      true,      // request data compression
                      false);    // disallow overwrite of existing files
endif;

Separate JADE processes can initiate concurrent file backups. This allows multiple files to be copied concurrently, which you can use to reduce elapsed backup time when the source and destination volumes are on different physical devices.

Because of increased disk contention and disk head movement, concurrent backup operations run slower if the backup is sent to a single disk drive.

You can use the JadeDatabaseAdmin class enableProgressEvents method to optionally notify operation and progress notifications for file backups. You must both enable and subscribe to this event if you want file backup operation and progress notification.

See also "DbFile Class Event Notifications", later in this section.