Skip to main content

run_migrate

Function run_migrate 

Source
pub fn run_migrate(db_dir: &Path) -> Result<String, CliError>
Expand description

Migrate the snapshot at db_dir to the current format version.

  • If the snapshot is already at the current version, prints already current (V<N>).
  • If the snapshot is an older version, writes snapshot.bin.bak (atomic + fsynced) then performs a truncating snapshot at the current version, and prints migrated V<from> -> V<current>.
  • WAL-only stores (no snapshot) are treated as needing a fresh snapshot.