It is never valid to backup a JADE database that is not closed, quiesced, or conditioned for external third‑party snapshot, by using non‑JADE backup software.
When a third‑party tool is used to backup a JADE database, the backup must be taken when the database is closed, quiesced, or conditioned for an external third‑party snapshot.
The preferred option is that the backup should be taken when the database is closed, as this allows use of the batch JADE Database utility (jdbutilb) custom backup support
This verifies the files and creates the restoreinfo file that contains MD5 file checksums, and an operational log in the database directory. If the
If ever the files are copied to a new disk location, they can be verified using the JADE Database utility
If the backup is to be taken while the database is quiesced, call the
You can also do this externally, by using the jomChangeAccessMode Application Programming Interface (API) call. For details, see "
When a primary changes to archive mode, the SDS service, if active, is stopped. The service is restarted as necessary when exiting from archive mode.
If the backup is to be taken while the database is being updated, call the
A system quietpoint is established and a checkpoint taken (reason=start snapshot).
A copy of the control file conditioned for snapshot recovery is made (_control.snap), and control state is marked as snapshot active.
The _control.snap file must be copied in the backup.
To exit from snapshot mode when the backup is complete, call the
A checkpoint is taken (reason=end snapshot).
An END_SNAPSHOT record is written to the journal (recovery from the start snapshot checkpoint record up to this record is necessary to restore file integrity).
Snapshot active control state is cleared.
You can also do this externally, by using the:
jomChangeAccessMode Application Programming Interface (API) call. For details, see "
jdbadmin program StartSnapshot and EndSnapshot database actions, to condition the database for recovery from a non‑JADE backup and to take the database out of snapshot mode, respectively. (For details, see "
It is essential that the backup processing occurs entirely while the database is in snapshot mode, and that as a minimum, journals from the start snapshot checkpoint to the END_SNAPSHOT record will be available for snapshot recovery.
If the database is accidentally closed while it is in snapshot mode, do not restart the database until the backup has completed. When restarted, the database will perform a snapshot recovery.
To recover from a third‑party backup taken while in snapshot mode, perform the following actions.
Restore the system using the backup software tools.
Copy any necessary journals into place.
Initiate recovery with the JADE Database utility or by starting the database.
Snapshot recovery is performed when database recovery (from database open, or JADE Database utility‑initiated recovery) detects the database is in snapshot mode. The _control.dat file is replaced with the _control.snap file and a roll‑forward recovery is performed. If the recovery was JADE Database utility‑initiated, the roll‑forward termination condition is that specified by you; otherwise the roll‑forward recovery is to end‑of‑last‑journal.
Roll‑forward recovery logic looks for the END_SNAPSHOT audit record. This indicates the point at which file integrity is known to be restored, assuming that the snapshot completed and the recovery is not due to restart.
Recovery due to restart will encounter the LOG_TRAILER or a header discontinuity, set snapshot state to incomplete, and then continue recovery as normal.
If a roll‑forward termination condition was specified and that condition is met before the database can establish an end‑snapshot condition, the recovery will fail with a 3192 error (Snapshot recovery terminated before end-snapshot condition established).
The end‑snapshot condition is satisfied when an END_SNAPSHOT record is encountered, or in its absence, a DATABASE_CLOSE or DATABASE_OPEN record is encountered. Snapshot state is set to recovered, and recovery then continues as normal.
If the third‑party backup tool is file‑based rather than block‑based, it will not be able to copy _control.dat, which is opened in exclusive mode by the database. This file can be excluded from the backup and when the database is restored, the _control.dat file can be recreated by copying _control.snap as _control.dat.
It is usual for third‑party block‑based backup tools to copy blocks changed since the last backup, and blocks that change during the backup. Therefore at the end of the backup, the image will contain all updates to journals in the journals\current directory.
Restoring such a backup and initiating the system without otherwise restoring journals will behave as a snapshot recovery due to restart.
To achieve the same behavior when the third‑party backup tool is file‑based, however, requires that the backup tool copies the journals after the data files have been copied.