How Shadow Logging Works [ STORE and TurboSTORE/iX Products Manual ] MPE/iX 5.5 Documentation
STORE and TurboSTORE/iX Products Manual
How Shadow Logging Works
TurboSTORE/iX 7x24 True-Online Backup uses shadow logging to intercept
any changes made to files while they are being stored.
When the Sync Point is at the Beginning
When the sync point occurs at the beginning of the backup (ONLINE=START),
shadow logging guarantees that TurboSTORE captures the state of the
fileset as it is right before the files begin to be written out. When a
file is opened for write access, any changes made to the file are
monitored by shadow logging. When a modification occurs, the part of the
file being changed is copied. This "before image" is added to internal
shadow log files. Once the data has been copied, the modification can
proceed. The before image logs for all files are maintained until the
information is requested by TurboSTORE. TurboSTORE requests a file's log
data once it has finished storing the file. The log data is written
immediately following the file data. The before image log data is
maintained until the media that the file resides on has been completed.
At reel switch time, or at the end of the backup (whichever comes first),
the before image log data for all files on that media is released.
By default, the before image log files are created on the same volume set
as the files being stored. You can create the log files on a specific
volume set by specifying the volume set name using the LOGVOLSET option,
as explained in "Performing Online Backup" in Chapter 6, "STORE and
TurboSTORE Command Options."
RESTORE restores a file by first reading the file data that had been
written to the media. The log data is then read in and replaces any
sections of the file that were already restored. Once a file's before
image logs are applied, the file is restored to its state at the time of
the sync point.
Figure 7-1 shows what a backup tape looks like if the sync point occurs
at the beginning of the backup (ONLINE=START).
Figure 7-1. Backup Created with Sync Point at the Beginning
When the Sync Point is at the End
When the sync point occurs at the end of the backup (ONLINE=END), shadow
logging captures the state of the files as they are at the end of the
backup. In this case, instead of copying the before images of
modifications to log files, shadow logging uses a bitmap to keep track of
the modified pages. Once the backup is completed, the bitmap is used to
collect the modified "after image" pages from the system. This data is
then written out to the end of the media. For parallel backups, after
image log data is written at the end of each parallel set. For more
information on parallel backups, see Chapter 3, "Preparing Storage
Devices".
During the backup when ONLINE=END is specified, logging is turned on for
a file when TurboSTORE begins to write it out. The logging stays on for
a file until the sync point occurs at the end of the backup.
When a file with after image log data is restored, the initial file data
is read in first. Once the after image log data is read in, it is
applied to the file data, reapplying all changes made to the files during
the backup. This restores all files to their state at the end of the
backup.
However, since the log data is at the end of the backup, files with after
image (AI) data are not available until the Restore completes and the
after image log data is applied.
Figure 7-2 shows what a backup tape looks like if the sync point occurs
at the end of the backup.
Figure 7-2. Backup Created with Sync Point at the End
MPE/iX 5.5 Documentation