---
title: How to check data-integrity
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical.com/dqlite/docs/howto/check-data-integrity?format=md
---

*Submit*

# How to check data-integrity

This guide shows you how to inspect the data integrity of a possibly-running dqlite instance and locate faults.

## [Steps](https://canonical.com/dqlite/docs/howto/check-data-integrity?format=md#p-630-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. Type and run the following command

   ```
   PRAGMA quick_check;
   ```

   If no issues are detected, you will see `ok`. If you believe issues exist, move onto the next command.
4. Type and run the following command

   ```
   PRAGMA integrity_check;
   ```

   If no issues are detected, you will see `ok`.

---

[Previous

Check cluster health](https://canonical.com/dqlite/docs/howto/check-cluster-health)
[Next

Create a snapshot](https://canonical.com/dqlite/docs/howto/create-a-snapshot)

Last updated 2 months ago. [Help improve this document in the forum](https://discourse.dqlite.io/t/how-to-check-data-integrity/563).
