Skip to main content

Module backup

Module backup 

Source

Structsยง

BackupEntry
Metadata for a single database backup.
BackupManifest
Manifest that tracks all database backups.
DbBackupManager
Manages versioned SQLite database backups.

Enumsยง

RestoreError
Errors that can occur when restoring a database backup.

Constantsยง

BACKUP_BUSY_SLEEP_MS ๐Ÿ”’
Milliseconds to sleep when the backup step returns SQLITE_BUSY or SQLITE_LOCKED.
BACKUP_DIR ๐Ÿ”’
Subdirectory under the database directory where backups are stored.
BACKUP_PAGE_COUNT ๐Ÿ”’
Number of pages copied per sqlite3_backup_step iteration.
MAIN_DB_NAME ๐Ÿ”’
SQLite database name passed to the online backup API ("main").
MANIFEST_FILE ๐Ÿ”’
Filename of the TOML manifest that tracks all known backups.
SQLITE_BUSY ๐Ÿ”’
SQLite result code indicating the database is busy.
SQLITE_COMPANION_SUFFIXES ๐Ÿ”’
File suffixes for SQLite companion files (WAL and shared-memory).
SQLITE_DONE ๐Ÿ”’
SQLite result code indicating the backup has finished.
SQLITE_LOCKED ๐Ÿ”’
SQLite result code indicating a table-level lock conflict.
SQLITE_OK ๐Ÿ”’
SQLite result code indicating success.

Functionsยง

add_suffix ๐Ÿ”’
Adds a suffix to a path before the file extension.
copy_sqlite_files ๐Ÿ”’
Copies an SQLite database file and its WAL/SHM companions.
online_backup ๐Ÿ”’
Creates an online backup of src_pool at dest_path.
remove_sqlite_files ๐Ÿ”’
Removes an SQLite database file and its WAL/SHM companions.
rename_sqlite_files ๐Ÿ”’
Renames an SQLite database file and its WAL/SHM companions.
run_backup_steps ๐Ÿ”’
Synchronous backup step loop using the SQLite C API.
sqlite_error_message ๐Ÿ”’ โš 
Returns the SQLite error message for a database handle.