backupJournal(number: Integer; sourceDir: String; backupDir: String; verify: Boolean; compress: Boolean; overwriteDest: Boolean);
The backupJournal method of the JadeDatabaseAdmin class backs up the transaction journal identified by the number parameter from the journal directory specified in the sourceDir parameter to the directory specified in the backupDir parameter. (The backup directory must be a valid directory relative to the server.) If the value of the sourceDir parameter is null, the current journal directory is used.
Set the verify parameter to true if you want the backed up file checked, or verified. In a checked file backup, objects are read using the database access routines and object caching mechanisms, and at the same time, a verification of the data and indexes is performed. The verification performs various consistency checks similar to a database certify, to ensure the integrity of the backup. Furthermore, additional checksum information is added to the backup, to allow restore operations to verify the integrity of the backup as the data is restored.
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.
When both the verify and compress parameters are set to false, a fast file backup is performed. In a fast file backup, database files are backed up in a similar fashion to a standard file copy, using large buffers and asynchronous I/O to speed up the copy process. The fast backup mode bypasses the database access-routines and cache management, and does not verify data as it is backed up.
Set the overwriteDest parameter to true if you want transaction journal backups to overwrite existing journals in the destination backup directory. When this parameter is false, an exception is raised if an existing transaction journal is detected. The following example shows the use of the backupJournal method.
vars dba : JadeDatabaseAdmin; verifyFiles, compressFiles, allowOverwrite : Boolean; backupDirectory : String; jnlNum : Integer; begin create dba; jnlNum := dba.getCurrentJournalNumber; backupDirectory := "z:\jade\backup5"; verifyFiles := true; compressFiles := false; allowOverwrite := true; dba.backupJournal(jnlNum - 1, null, backupDirectory, verifyFiles, compressFiles, allowOverwrite); epilog delete dba; end;