Database snapshots

Snapshots back up a managed database while it keeps serving. Use them to roll a database back after a bad migration, or to fork a copy for testing. They work for PostgreSQL, MySQL, Valkey and ClickHouse. Kafka clusters rely on replication and topic retention instead.

Take a snapshot

  1. Open the database from Databases and click Take a snapshot.
  2. Keep or change the Name.
  3. Click Take a snapshot.

The snapshot reads Capturing until it's done, then Available. Every snapshot of every database is listed in Databases → Snapshots.

Snapshots always capture the primary, and what they hold depends on the engine:

Engine What a snapshot holds
PostgreSQL Every committed transaction.
MySQL A transactionally consistent copy.
Valkey Your data as of a few seconds before the capture.
ClickHouse Every acknowledged synchronous insert. Data in Buffer tables can be missing.

Snapshots list with restore and fork actions

Roll a database back

Restoring to the origin database keeps its hostname, credentials, private networks and firewall, and rebuilds its replicas from the snapshot.

  1. Go to Databases → Snapshots.
  2. Open the snapshot's menu and click Restore to origin database.
  3. Type the database's name to confirm.
  4. Click Restore database.

Everything written after the snapshot was taken is lost. The database reads Restoring until it's back.

Restore to origin database not available?

The origin database must be running, and the snapshot must come from its current primary. After a failover, snapshots taken before it can only be forked into a new database, and so can snapshots of a removed database.

Fork into a new database

A fork is a new database built from the snapshot, on the same plan and in the same data center. It gets a new hostname and fresh credentials, and it starts with public access off.

  1. Go to Databases → Snapshots.
  2. Open the snapshot's menu and click Fork into a new database.
  3. Enter a Name.
  4. Click Fork database.

Remove a snapshot

Snapshots outlive their database, so removing a database keeps its snapshots. Remove the ones you no longer need:

  1. Go to Databases → Snapshots.
  2. Open the snapshot's menu and click Remove.
  3. Click Remove snapshot to confirm.

The database isn't affected.

Quotas and billing

Database snapshots are billed like server snapshots and share their quotas. Over a limit, new snapshots are refused, while existing ones stay available to restore and remove.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏