Module backup

Module backup 

Source

Structsยง

NonFinalizedBlockBackup ๐Ÿ”’

Constantsยง

MIN_DURATION_BETWEEN_BACKUP_UPDATES ๐Ÿ”’
The minimum duration that Zebra will wait between updates to the non-finalized state backup cache.

Functionsยง

list_backup_dir_entries ๐Ÿ”’
Accepts a backup directory path, opens the directory, converts its entries filenames to block hashes, and deletes any entries with invalid file names.
process_backup_dir_entry ๐Ÿ”’
Accepts a DirEntry from the non-finalized state backup directory and parses the filename into a block hash.
read_backup_dir ๐Ÿ”’
Accepts a backup directory path and opens the directory.
read_non_finalized_blocks_from_backup ๐Ÿ”’
Reads blocks from the provided non-finalized state backup directory path.
restore_backup ๐Ÿ”’
Accepts an optional path to the non-finalized state backup directory and a handle to the database.
run_backup_task ๐Ÿ”’
Updates the non-finalized state backup cache whenever the non-finalized state changes, deleting any outdated backup files and writing any blocks that are in the non-finalized state but missing in the backup cache.
write_backup_block ๐Ÿ”’
Writes a block to a file in the provided non-finalized state backup cache directory path.