Expand description
Backup, restore, and journal recovery.
- Backup deep-copies the source repository’s head — the super-root, so the content root and every checkpoint — into a target store, read-only on the source (no lock) and read-write on the target.
- Restore does the same with the roles swapped: the backup is the read-only source, and its head is copied into an existing store and becomes the new head.
- Recover-journal rebuilds
journal.logwhen it is missing or unusable by scanning every data segment for candidate super-roots (nodes with both arootand acheckpointschild), verifying the newest one is fully traversable, and rewriting the journal with the surviving candidates oldest first — ordered by the timestamp in each segment’s info record — so the consistent head is the last line.
All three run under the target’s repository lock, so they can never race a running AEM instance, and all leave the store in a state a subsequent AEM start consumes cleanly.
Structs§
- Recovery
Outcome - The outcome of a journal recovery.
Functions§
- backup
- Copies the source repository’s head into
target_directory, overwriting the target’s head with the copied super-root. The target is created when absent. - backup_
with_ progress - Backs up exactly like
backup, reporting the source scan and the node copy toobserver. - recover_
journal - Rebuilds
journal.logfrom the segments on disk. Scans every data segment for super-root candidates, verifies the newest one is fully traversable, and rewrites the journal with the surviving candidates oldest first, so the verified head is the last (winning) line. Backs up any existing journal tojournal.log.bak.NNN. - recover_
journal_ with_ progress - Recovers exactly like
recover_journal, reporting the candidate scan and the consistency probe toobserver. - restore
- Restores a backup into an existing store: the backup’s head is copied
into
target_directoryand becomes the new head. The target’s earlier revisions remain in the journal until later compaction reclaims them. - restore_
with_ progress - Restores exactly like
restore, reporting the backup scan and the node copy toobserver.