Expand description
Incremental backup and point-in-time recovery.
Provides backup_full(), backup_incremental(), and restore_to_epoch()
APIs on GrafeoDB. Full backups capture the entire
database state; incremental backups export only the WAL records since the
last backup. Recovery replays a chain of full + incremental backups to
restore the database to any committed epoch.
§Backup chain model
[Full Snapshot] -> [Incr 1] -> [Incr 2] -> ... -> [Incr N]
epoch 0-100 101-200 201-300 901-1000To restore to epoch 750: load full snapshot (epoch 100), replay incrementals 1-7, stop at epoch 750.
Structs§
- Backup
Cursor - Tracks the WAL position of the last completed backup.
- Backup
Manifest - Tracks the full backup chain for a database.
- Backup
Segment - Metadata for a single backup segment (full or incremental).
Enums§
- Backup
Kind - The type of a backup segment.
Constants§
- BACKUP_
HEADER_ SIZE - Header for an incremental backup file.
- BACKUP_
MAGIC - Magic bytes for incremental backup files.
- BACKUP_
VERSION - Current backup file version.
Functions§
- read_
backup_ cursor - Reads the backup cursor from a WAL directory.
- read_
backup_ header - Reads and validates the incremental backup file header.
- read_
manifest - Reads the backup manifest from a backup directory.
- write_
backup_ cursor - Writes the backup cursor to a WAL directory.
- write_
backup_ header - Writes the incremental backup file header.
- write_
manifest - Writes the backup manifest to a backup directory.