Skip to main content

How to recover from corrupt state

This guide shows you how to roll back your cluster to the last valid data state following a corruption.

Steps

  1. Type and run dqlite-utils --dir /path/to/dqlite/dir. You will see the dqlite-utils repl start.
  2. Type and run the .open command. You will see the open shell at the ‘latest’ data version.
  3. The open shell supports arbitrary SQL. Inspect the data to identify the corruption.
  4. Use the .set-index command to travel back in time to log entry before the corruption occurred. See how to check data-integrity.
  5. Create a backup a dqlite cluster of the valid data.
  6. Create a snapshot containing the backup.
  7. Restart your cluster starting from the just-created snapshot.

You will now see your cluster operating normally, starting on the data immediately before the corruption.

Last updated 12 hours ago. Help improve this document in the forum.