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
- Open the database from Databases and click Take a snapshot.
- Keep or change the Name.
- 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:
Roll a database back
Restoring to the origin database keeps its hostname, credentials, private networks and firewall, and rebuilds its replicas from the snapshot.
- Go to Databases → Snapshots.
- Open the snapshot's menu and click Restore to origin database.
- Type the database's name to confirm.
- 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.
- Go to Databases → Snapshots.
- Open the snapshot's menu and click Fork into a new database.
- Enter a Name.
- Click Fork database.
Remove a snapshot
Snapshots outlive their database, so removing a database keeps its snapshots. Remove the ones you no longer need:
- Go to Databases → Snapshots.
- Open the snapshot's menu and click Remove.
- 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! 🙏