beginBackup

beginBackup(backupDir: String;
            quiesced:  Boolean);

The beginBackup method of the JadeDatabaseAdmin class signals the start of a database backup transaction in which multiple database files are copied.

The backupDir parameter specifies a default location for file backups and the directory where control files are copied when the backup is committed. (The backup directory must be a valid directory that is relative to the server.)

Use the quiesced parameter to specify whether updates are allowed during the backup process (by setting this parameter to false) or if the backup is to be performed in read-only mode. When restoring a database backed up fully online (that is, this parameter is set to false and the database was available for both read and write access at the time of the backup), the restoration process requires the recovery of backed up transaction journals. (For details, see "Using the Restore Database Command", in Chapter 1 of the JADE Database Administration Guide.) When a database is backed up in the quiescent mode, the physical database files are guaranteed to contain all database updates, and a recovery is not required when the backed up database is restored.

Set the quiesced parameter to true to specify that the database is locked for write access during the backup operation and to enable archival recovery. (Database records can still be read in this mode, although not updated.) When a database is backed up in a quiescent mode, any threads that attempt to start a new transaction are first blocked, waiting for pending transactions to complete. All dirty buffers for objects resident in the file are flushed and the file is locked against further updates. At this point, threads blocked by the beginTransaction instruction are allowed to continue. (Database operations that attempt to update a file in read-only mode receive an exception.)

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

// Begin a backup transaction.  The quiesce parameter is false, meaning
// that a 'hot' or online backup will be performed, allowing online
// updating to continue during the backup processing.
self.dba.beginBackup(defaultDirectory, false /*=> online backup*/);