RocksDB BackupEngine
RocksDB BackupEngine manages backup recovery points, their file metadata and restoration into a database directory.
Recovery points have backup IDs. With file sharing enabled, backups reuse SST and blob files in their repository rather than duplicating unchanged files. [2]
CreateBackupOptions::flush_before_backup defaults to false; set it true for no-WAL writes. BackupEngineOptions::sync defaults to true and controls the documented crash guarantee. [1]
VerifyBackup(id) checks presence and size by default; passing true also compares checksums. [1] Neither mode starts the application, so successful verification is not an application restore test. [3]
Source-file protection needs a compatible earlier checksum, not just a digest first computed while copying. The v10.10.1 creation path requests stored source checksums for FileChecksumGenCrc32cFactory. Incremental creation can reuse backup files and their prior checksum without rereading them; successful creation is not a fresh integrity scan. [3]
Relations
- related
- rocksdb-read-snapshot, rocksdb-checkpoint, backup, backup-manifest, backup-verification, restore-test, incremental-backup, write-ahead-log, checksum, rocksdb-manifest
Citations
- RocksDB v10.10.1. backup_engine.h: backup creation, synchronization and verification.
- RocksDB project. How to backup RocksDB: sharing, restore and backup metadata.
- RocksDB v10.10.1. backup_engine.cc: VerifyBackup implementation.
Further reading
Sources & caveats
- API defaults and verification behavior are scoped to RocksDB v10.10.1. Backup file sharing does not establish independent storage failure domains.