Version 8.2.4
 —  Concepts  —

Introducing Adabas Delta Save Facility

Software AG's Adabas Delta Save Facility (DSF) offers significant enhancements to ADASAV utility processing by backing up and restoring only the changed (delta) portions of Adabas databases.

The Delta Save Facility

While maintaining the availability of Adabas SAVE and RESTORE functions, the high performance of Adabas, and the ability of Adabas to survive system failures, DSF increases database availability by

Because DSF allows more frequent save operations, database recovery time is reduced.

DSF is intended for Adabas sites with one or more large, heavily updated databases that need to be available most of the time. Especially for sites where the volume of data changed on a day-to-day basis is considerably smaller than the total database volume, DSF provides for

This document tells you how DSF operates and how it manages Adabas database save operations more effectively.

This document covers the following topics:


How the Adabas Delta Save Facility Works

During normal Adabas database operation, the Adabas Delta Save Facility keeps track of changed Associator and Data Storage blocks. The RABNs of blocks that are altered are recorded in a portion of the Associator called the Delta Save logging (DLOG) area, allocated for the purpose. During a delta save operation, images of these changed blocks are copied to create a delta save tape.

Delta save and normal Adabas nucleus operations can occur in parallel. Any changes made by the nucleus during the delta save operation are later retrieved from the Adabas protection log (PLOG). In most cases, the resulting delta save output is written to tape for later use.

Merging the most recent ADASAV SAVE result (SAVE database) with all following delta save output results in a new full database save that reflects the database status following the last delta save operation. Alternatively, the latest SAVE database and all subsequent delta save results can be supplied as input to a database restore (ADASAV RESTORE DELTA) operation.

The specific stages in this process are as follows:

  1. Enable Delta Save operation by performing a normal full save (ADASAV SAVE database) that contains the entire database.

  2. At some point following step 1, perform a delta save (ADASAV SAVE DELTA) operation, creating output that contains only the blocks that were changed since the last full or delta save operation was performed; this can be done multiple times.

  3. Optionally, merge several previously created delta save outputs to produce a "consolidated" delta save tape comprising all changes since the last full save tape creation.

  4. Merge the previously created full and delta save output to produce an up-to-date full save tape. Note that the old full or delta save inputs can also be the result of previous merge operations.

  5. If the need arises, restore the database by supplying either a fully merged full save tape, or the most recent full save tape and all subsequent delta save tapes.

Conventional Database Save Operation

Without the Delta Save Facility, a conventional database save operation can be performed with the Adabas nucleus inactive (offline) or active (online).

Offline Save

An offline save is performed with the Adabas nucleus inactive. No concurrent access or update of the database is allowed so that the resultant save tape contains all database Associator and Data Storage blocks consistent with the time of the save operation.

graphics/offline_save.png

The graphic shows the general sequence of a conventional Adabas database offline save operation without Delta Save. First, the ADASAV utility's SAVE function is used to create a full database save (SAVE database), usually on tape. If the need arises, this full database save can be used for restoring either the entire database or specific files to their state at the time of the save operation (using the ADASAV RESTORE function).

Online Save

An online save is performed while the Adabas nucleus is active and the database is available for normal use. During the online save, users may access and update records in the database. Concurrent utility updates are not allowed.

At the end of the save, ET synchronization ensures that all partial transactions are completed before new transactions are started so that the database is in a consistent state. Since the database can be modified during the save operation, the save tape alone may not be consistent with the database. Therefore, the images of any blocks in the database that were changed while the save operation is in progress are recorded in the protection log (PLOG), as shown in Online Adabas Save Sequence.

graphics/online_save.png

If required, the entire database or specific files can be restored to the state at the end of the online save operation by using the full database save tape together with the associated protection log as input to the ADASAV RESTONL function, as shown below.

graphics/online_restore.png

Save Operation with Delta Save

The Delta Save Facility provides full save and delta save operations. The full save saves the whole database, similar to a conventional database save, and is invoked by the ADASAV SAVE function. The delta save operation saves only blocks changed since the last full or delta save operation, and is invoked by the ADASAV SAVE DELTA function. For full save and delta save operations, the database administration blocks, FCBs, FDTs, and DSST are always saved.

Although the procedure for creating a delta save tape is much the same as for a full database save tape, the actual time required is much less because only the changed areas of the database are saved. Secondly, by performing less frequent full saves but more frequent delta save operations, the overall time needed to run the save operations is normally considerably less than performing the same number of conventional database save operations.

Further processing of full save and delta save tapes is provided by the ADASAV MERGE function. The merge function can be performed offline and therefore does not affect database processing.

When an ADASAV SAVE DELTA operation is performed, the logged Delta Save information is read and compiled into a save tape containing only those changes made since the last full or delta save operation, as shown in the following Offline Delta Save Tape and Online Delta Save Tape diagrams.

graphics/offline_delta_save.png

graphics/online_delta_save.png

Online Delta Save Tape shows that the online delta save-like a full save-results in protection log (PLOG) output for any activities performed while the delta save was in process.

In addition, however, the PLOG copy (ADARES PLCOPY) operation after the delta save produces a delta save images (DSIM) data set. This new data set holds copies of all Associator and Data Storage blocks changed while the online delta save operation was in progress, and provides them for a subsequent merge operation.

The save tapes created by the ADASAV SAVE FILE or ADASAV SAVE INCREMENTAL functions cannot be used as delta save tapes and therefore cannot be used in merging operations.

Tracking Database Changes

When the Delta Save Facility is used, the nucleus logs the RABNs of changed blocks in the Delta Save logging area (DLOG). The DLOG area is allocated within the Associator by the Adabas basic online services facility. The delta save operation retrieves RABNs of blocks to be saved from the DLOG area. When a full save or delta save operation completes successfully, the DLOG area is reset.

The DLOG area is continuously updated as more blocks are changed by normal nucleus operation. In addition, Associator and Data Storage changes made by utilities are recorded, although not in the DLOG area but in the FCBs of the affected files.

When a utility modifies a file, information is recorded in the related FCBs that the file's Data Storage, address converter, and/or index was changed. The changed RABNs themselves are not logged. Thus, for example, when the ADAORD REORFDATA function reorders the Data Storage of a file, it sets marks in the FCB of the file to indicate that the entire Data Storage and address converter of the file are to be saved in the next delta save operation.

If the utility function is ADALOD UPDATE, the RABN ranges of changed Data Storage and address converter blocks are stored in a file-specific extension of the DLOG area allocated by ADALOD. Only the blocks in the extension are marked for saving during the next delta save operation. (ADALOD UPDATE always changes, and marks as changed, the entire index of the updated file.) If the area reserved for logging RABNs changed by ADALOD UPDATE overflows, the logging information is compressed and more blocks than were actually modified will be saved in the next delta save operation.

Merging the SAVE Output

The ADASAV MERGE function combines the delta save results and, where applicable, the original or unloaded DSIM data set from one or more ADASAV SAVE DELTA operations to create a new delta or full save tape. This is illustrated in Merge Operation - Making a Consolidated Delta Save Tape.

When you "unload" the DSIM data set, you transfer its contents to a sequential delta save data set without specifying and processing the online full or delta save data set associated with the DSIM data set. The unloaded DSIM data set can be used for MERGE or RESTORE DELTA operations.

If only delta saves (that is, no full saves) are merged, the output is a single, consolidated delta save tape. Such a save tape comprises all database changes that occurred in the time period covered by the input delta saves.

If the input contains a full save tape, the merge operation results in a single, merged full save output. A merged full save tape contains the whole database as it was at the time when the last input delta save was written.

graphics/merge_op_consol.png

The original DSIM data set corresponds to any online save input. Any online delta save input to which the original DSIM, if supplied, does not correspond must be followed (with the next higher sequence number) by the corresponding unloaded DSIM.

If the full save input is an online save tape, it must be accompanied either by its original DSIM data set or followed by the delta save data set created when the original DSIM data set was unloaded. This is illustrated in Merge Operation - Making a New Full Save Tape.

graphics/merge_op_full.png

The unload frees the DSIM data set for the next online save operation. Unlike a MERGE of the DSIM data set, its "unload" eliminates the need to process the associated online save data set-which may be very large in the case of a full save-again just after it has been created.

The original rather than the unloaded DSIM data set related to any online save operation can be supplied for the merge operation. Following the merge operation, the DSIM data set is reset and can then be used for the next online save operation.

The possible inputs for merging are

It is a requirement for all input save tapes to be from a continuous sequence of save operations on the same database. No save tapes can be omitted; otherwise, the result would be inconsistent. Therefore, a non-continuous sequence of input tapes is rejected by the ADASAV MERGE function.

Each input save tape can be the result of earlier merge operations.

The output tape may be used in subsequent merge operations.

Any online save input to the merge operation must be accompanied by either the original or the unloaded DSIM data set related to that online save operation. Only one original DSIM data set can be specified.

The output of a merge operation is always the same as an offline save tape; it can be specified with a new online delta save tape in a subsequent merge operation.

If more than eight consecutive delta save tapes have been created, you must merge the first eight, and then the result of that merge with the next delta save tape(s), and so on, in chronological order.

Delta Save Identifier (DSID)

If the Delta Save Facility is used, every save tape (full or delta) is assigned a Delta Save identifier (DSID), which is used for consistency checking in merge operations, for example, to prevent invalid merge operations. The DSID comprises the full save number, the delta save number, and a time stamp.

The full save number counts the number of full save operations since the Delta Save Facility was installed. The delta save number counts the number of delta save operations since the last full save. The time stamp records the date and time of the last full or delta save.

Each full save operation increments the full save number by one, resets the delta save number to zero, and assigns a new time stamp. Each delta save operation leaves the current full save number unchanged, increments the delta save number by one and assigns new time stamp.

When save tapes (full or delta) are subsequently input for merging, they must have the same full save number, consecutive (or overlapping) delta save numbers, and ascending time stamps. Overlapping delta save numbers in data sets used as input to the merge are allowed.

During a merge operation, the DSID of the merged save tape (full or delta) is derived from the input DSIDs as follows:

Example:

Full save input DSID: 4/0/t1 (Full save number 4, delta save number 0, date/time t1)
Delta save input 1 DSID: 4/1/t2
Delta save input 2 DSID: 4/2/t3
Merged full save output DSID: 4/0-2/t3

Invalid Merges

Before a merge operation starts, the Delta Save Facility checks that the DSIDs of the full and delta save tapes are a valid combination. In almost all cases, this check reliably prevents any invalid merge operation.

There are, however, some unusual cases in which the check is insufficient, namely when DSIDs are "reused" after

Example:

Full save DSID 1/0/t1 (t1 is a time stamp)
... updates ...  
Delta save DSID 1/1/t2
Restore full save, restores DSID 1/0/t1
... updates ...  
Delta save DSID 1/1/t3
... updates ...  
Delta save DSID 1/2/t4

It is now possible to merge full save 1/0/t1, delta save 1/1/t2, and delta save 1/2/t4, even though this is an invalid combination. Such a mistake can be avoided by observing the following rules:

Important Rules
1. When the database is restored to an old status, all delta save tapes produced after the time represented by that status must no longer be used and should be discarded.
2. When the DLOG area is removed and reinstalled, all existing delta save tapes should be discarded.

In the example above, delta save tape 1/1/t2 should have been discarded after the restore.

Protection Log (PLOG) and DSIM Data Set Processing

When the Delta Save Facility (DSF) performs an "online" save operation, special processing is required for the PLOG and the DSIM data set that is not necessary for an offline save operation.

The nucleus should run with a dual or multiple PLOG when performing an online save with DSF. PLOG and DSIM data set processing proceeds as follows when dual or multiple protection logging is in effect:

  1. The DSIM data set must be free (not in use) initially.

  2. The online save acquires the DSIM data set for use.

  3. The online save operation starts (full or delta).

  4. The nucleus writes images of changed blocks to the dual or multiple PLOG.

    During a single online save operation, several ADARES PLCOPY operations may be performed to copy the dual or multiple PLOG information to the sequential PLOG and to extract images of the changed Associator and Data Storage blocks and write them to the DSIM data set.

    ADARES can be invoked documentationly or by user exit 2 (dual logging) or user exit 12 (multiple logging) when it is programmed as recommended (see the Adabas DBA Tasks documentation for information about the user exits). The user exit invokes ADARES when a PLOG is switched, which happens either when one PLOG data set runs full or when the FEOFPL function is issued from ADADBS OPERCOM, AOS, or the operator console.

    Creating an online save tape and building a corresponding DSIM data set are related but separate operations. The DSIM data set can be built step by step during the several PLCOPY operations that may be performed. However, when the online save operation ends, a PLCOPY operation for completing the DSIM data set is still outstanding.

  5. The online save operation terminates. At this point there is information on the PLOG that must be copied to the DSIM data set.

  6. ADARES PLCOPY is run again to complete the DSIM data set.

    1. A subsequent merge operation combines the online save tape and the DSIM data set.

      For the merge operation:

      • zero or one (1) full save data sets and zero to eight (8) delta save data sets can be merged.

      • both offline and online save data sets can be supplied to a single merge operation.

      • online full or delta save data sets must be supplied in sequence with the appropriate DSIM data set. Unloaded DSIM data sets count as delta save data sets. Any online save data set must be accompanied by its associated original or unloaded DSIM data set.

      The result of merging an online save data set and its DSIM data set is an "offline" save tape.

      The merge function waits for completion of the DSIM data set if the DSIMWAIT parameter is specified.

    2. Alternatively, you can "unload" the DSIM data set without immediately merging it with the online save, deferring this merge until a later time (see the DSIMWAIT parameter).

  7. On completion of the merge or unload operation, the DSIM data set is freed (no longer in use).

Example

Delta Save - Save/ Merge Sequence (four steps) shows several Delta Save save and merge operations.

Step 1: Online Full Save

graphics/delta_save1.png

Step 2: Online Delta Save

graphics/delta_save2.png

Step 3: Online Delta Save, Merge Consolidated Delta Save

graphics/delta_save3.png

Step 4: Online Delta Save, Merge Full Save

graphics/delta_save4.png

Sample Schedule for Save and Merge Operations

  1. Start a cycle with a full save.

  2. Perform a delta save operation every day.

  3. Maintain a consolidated delta save tape that contains all blocks changed since the start of the cycle.

  4. To achieve this, merge the consolidated delta save tape with each new delta save tape to get a new consolidated delta save tape.

  5. Once a week, merge the full save tape and the consolidated delta save tape to get a new full save tape.

  6. This completes the cycle and starts a new one.

Restoring Delta Save Save Output

Merged full save tapes can be used for any ADASAV RESTORE function in the same way as conventional database save tapes. If delta saves have been taken since the production of the last full save tape, the full save and the delta saves can be merged to produce a new full save suitable for RESTORE.

To save time when recreating the database or files, full and delta saves can be merged and restored directly by using the ADASAV RESTORE DELTA function. The input for RESTORE DELTA is

-as shown in Delta Restore Option.

graphics/delta_restore.png

Consecutive saves must be specified for RESTORE DELTA: no save tape may be missing. Each save tape may itself be the output of an earlier merge operation. For tapes that originate from online save operations, the corresponding original or unloaded DSIM data set must be specified. An original DSIM data set is not reset at the end of the RESTORE DELTA operation but remains available for further merge operations.

If no delta save tape is supplied, the full save tape must be online and the corresponding DSIM data set, original or unloaded, must be specified. If only an offline full save tape is supplied, the conventional RESTORE function must be used.

If save and merge operations are performed as in the schedule described in the section Sample Schedule for Save and Merge Operations , at any time only the last (merged) full save tape, the consolidated delta save tape and, if present, the most recent yet unmerged delta save tape are required to restore the entire database to the status of the last delta save operation. This can be done with RESTORE DELTA.

Although the delta restore operation can restore the entire database, it is also possible to specify the GCB, FILE, or FMOVE parameters to restrict the delta restore operation, similar to a conventional restore.

On the input side, RESTORE DELTA is like MERGE since the input consists of a number of of full save and delta save tapes. On the output side, RESTORE DELTA is like RESTORE since data is restored to the physical database.

If a delta restore operation is interrupted, it can be restarted, provided the full save has already been restored. This status is indicated by a message in the ADASAV protocol. In this case, the interrupted delta restore operation may be restarted by resubmitting the job, but without the job control specification for the full save tape. Then, ADASAV will continue the operation and restore the delta save tapes. If a restart is not possible, the whole delta restore operation must be repeated.

Operating a Shadow Database with Delta Save

The Delta Save Facility can be used to set up and maintain a "shadow" database; that is, a copy of the original database. Such a shadow database can

The Delta Save Facility maintains a shadow database by

graphics/shadow_db1.png

graphics/shadow_db2.png

Such a shadow database has the following characteristics:

The shadow database is kept up to date with the RESTORE DELTA function. The input requirements for RESTORE DELTA are as described in the section Restoring Delta Save - Save Output, except that the full save tape is omitted.

When the shadow database is updated by the sequence of delta restore operations, consecutive delta save tapes must be supplied; that is, no delta save may be omitted. This is checked using the DSIDs of the save tapes.

The delta save operations on the original database may be performed offline or online. When using online delta saves to update then shadow database, the DSIM data set processing applies as for normal RESTORE DELTA operations. However, an original DSIM data set is not freed at the end of the RESTORE DELTA operation, so that it can also be used for a merge operation with the online save tape.

Top of page

Delta Save Functions

The Delta Save Facility provides the following additional or changed Adabas utility functions:

ADASAV

The following ADASAV functions have been added for use with the Delta Save Facility:

As the result of "online" SAVE DELTA operations, the images of changed database blocks are written to the Delta Save images (DSIM) data set, a direct access data set that must be located on disk. The DSIM data set is specified as

New data sets used for the MERGE and RESTORE DELTA functions are specified as

ADARES

The following ADARES functions have been revised for use with the Delta Save Facility:

ADAREP

ADAREP utility operation has been revised to include Delta Save usage, save (full and delta), and logging information.

ADAFRM

The following ADAFRM functions have been added for use with the Delta Save Facility:

ADAPRI

The ADAPRI DSIMPRI function prints one or more specified DSIM data set blocks.

ADAULD

The ADAULD utility has been modified to unload an Adabas file from a full save tape together with 1 to 8 delta save tapes and optionally a DSIM data set. The save tapes may have been created online or offline using any version of the Delta Save Facility.

Top of page