%SYS.Journal.File
persistent class %SYS.Journal.File extends %Library.Persistent
SQL Table Name: %SYS_Journal.File
Journal file related APIProperty Inventory
Method Inventory
- Archive()
- ArchiveAll()
- ArchiveOne()
- CheckIntegrity()
- ClusterStartTime0Get()
- ClusterStartTimeGet()
- Compress()
- Decompress()
- EndGet()
- FirstRecordGet()
- GetGUID()
- GetMaxSize()
- GetMirrorGUID()
- GetNext()
- GetPrev()
- GetReason()
- GetRecordAfter()
- GetRecordAt()
- GetRecordBefore()
- GetSystemGUID()
- IsValidJournal()
- LastEncrypted()
- LastMarkerGet()
- LastRecordGet()
- Open()
- Purge()
- PurgeAll()
- PurgeOne()
- RequiredForClusterRecovery()
- RequiredForRecovery()
- RequiredForRollback()
- Restore()
- RestorePIDList()
- Summary()
- TranslateReason()
- Use()
Parameters
Properties
Methods
Parameters:
- NSecondsOld: journal files must be at least this # of seconds old to be archived
- NBackupsOld: journal files must be older than this # of successive successful backups to be archived
Note: It is the completion time, rather than the creation time, of a file that must meet the time criterion if specified. Thus, a file may not be OK to archive even though its timestamp appears to meet the time criterion.
Warning: Post-backup journal files are not necessarily preserved.
Warning: This method does NOT check for open transactions before deleting the journal file.
FilePath: the full path of the journal file to archive
ArchiveTimeH: Time of archiving in $H format
LogOnly: if 1, skip archiving and log the archived file only. Default = 0
jrnlist can be either a file path or, if passed by reference, a number-indexed array of file paths, e.g.:
jrnlist(1)=path1, jrnlist(2)=path2, etc.
The file paths in the array should be in chronicle order, that is, path1 and path2 are assumed to have been created consecutively in the example above. If it is determined that the files in the given array do not meet that criterion, a single value 0 is returned (for "Invalid Parameter") and the top node of the array is set to the number index of the offending path.
Detail: If 1, scan each given journal file forward to locate the last record and verify it is the last record to be expected.
If 2, verify values stored in each record are retrievable.
If SrcDirs is set to 1 and passed by reference, the database directories used in the specified journal file(s) will be stored in SrcDirs array upon return.
- engine is the name of one of the supported compression engines (eg. lz4, zstd or zlib)
- chunksz is in MB (range=1-16) and specifies how much uncompressed journal data to pack into one compressed chunk. Larger chunks increase compression efficiency but requires larger buffers and reading more data from disk to access a journal file record.
If compression fails a partially created output file is deleted.
The output file must not exist to start with or an error is returned.
In order to compress an encrypted file the encryption key must be active and the output file will be encrypted.
Caution: Be careful with file names. If the intention is to create a compressed version of a journal file with the system's naming scheme by appending a 'z' to the name, specify a temporary output file and then rename/move the resulting file if the operation is succesful to the target name. It is best to avoid having incomplete files with a file name the system might look for. Also take care to ensure the output file has the proper filesystem level protection.
- The output file must not exist or an error is returned
- If decompression fails, the output file will be deleted
- To decompress an encrypted file the encryption key must be active and the output file will be encrypted.
InSession: whether to limit the search within a journal session (default=NO)
This is used to help people identify which system created the journal file.
Since this comes from the config file, it's possible that this can change over time but its not supposed to.
Parameters:
- NDaysOld: journal files must be at least this # of days old to be purged
- NBackupsOld: journal files must be older than this # of successive successful backups to be purged
Note: It is the completion date, rather than the creation date, of a file that must meet the date criterion if specified. Thus, a file may not be OK to purge even though the date in its name appears to meet the date criterion.
Warning: Post-backup journal files are not necessarily preserved.
Warning: This method does NOT check for open transactions before deleting the journal file.
FilePath: the full path of the journal file to purge
PurgeTimeH: Time of purging in $H format
LogOnly: if 1, skip purging and log the purged file only. Default = 0
FileName = # of nodes where journal recovery is required
FileName(csn) = the path of the oldest journal file on node <#csn>
If SkipSelf = 1, skip the node where the method is called (local node is covered by RequiredForRecovery()
FileName="" if journaling is disabled, meaning that none is required, as transactions cannot be rolled forward or backward from a pre-disabling file
FileName: the oldest file containing open transactions or current journal file
FileCount: the file counter value assigned to the file
FileCount: the file counter value assigned to the file
Queries
The file size is the actual size on disk which for compressed files should be smaller than the amount of journal data in the file.
By default, files are listed in reverse order of time, unless TimeOrder = 1
If FileName is specified, files are listed until FileName is reached (depend on TimeOrder)
If CSN is given, only files belong to the node are listed.
The file size is the actual size on disk which for compressed files should be smaller than the amount of journal data in the file.
DaysToKeep: How many days of journal files to keep. Use default (current system setting) if left unspecified. If 0, none is purgeable; if <0, all files are purgeable except those required for transaction rollback and crash recovery.
Indexes
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %AddToSyncSet()
- %BuildDeferredIndices()
- %BuildIndices()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()