Backups and restore

What is backed up and how long it is kept, restoring a backup into a new database, and what a restore does not bring back.

Every database is backed up automatically. There is nothing to turn on and nothing to schedule. This page covers what a backup is, how long it is kept, and how to restore one.

What is backed up

A backup is a copy of a database's documents. Its recovery point is the time it is good for: every write confirmed before that time is in the backup. Restoring a backup brings the documents back as the backup holds them.

A backup does not include credentials. Database keys and token keys are never part of a backup and are never restored.

When backups are taken

  • On a schedule. Once a day the database's cluster takes a full backup of it, which starts a new chain. Every hour after that, it adds an increment to the chain: what was written since the backup before. A full and each increment are backups of their own, each one restorable. An hour without a complete backup is reported, not hidden: see missedSlots below.
  • At deletion. When a database is deleted, a final backup is taken once access to it is blocked, so that nothing written before the deletion is missed.

The schedule is run by the database's cluster itself, so backups go on even while the dashboard and the management API are unavailable.

A backup counts only once it has been checked by reading it back from where it is stored: every object it is made of, and every document's state. Each backup is read back before it is listed as complete; until then it is listed as running. A backup that is read back and found not whole fails, and so do the later increments of its chain, which build on it.

How long backups are kept

A backup is kept for one of two retentions, a shorter and a longer one, counted from when its chain started:

BackupKept for
An hourly incrementThe shorter retention: 7 days as the service is set up now
The full that starts each day's chainThe longer retention: 30 days as the service is set up now
The final backup of a deleted databaseThe longer retention: 30 days as the service is set up now

The cadence and both retentions are settings of the service and can change. What holds for a particular backup is its own expiry, shown in the Kept until column and returned as retainUntil: read that rather than assuming a length. A backup can be restored until then. The cluster may keep it a little longer (it never removes a database's newest backups, or a chain still being added to), but it can no longer be restored.

Backups are never deleted early. Each one is kept until its retention ends, whatever happens to its database in the meantime. This is why a deleted database stays listed until its last backup has expired: see database lifecycle.

The Backups page

A database's Backups page has two parts.

Protection describes what protects the database's data right now:

  • Confirmed writes: how the database's placement keeps a write once it is confirmed.
  • Recovery point: how far back a restore would go now, and the recovery point the service aims for.
  • After a deletion: what happens to the database and its backups if it is deleted.

Backups lists the database's backups, newest first:

ColumnMeaning
HourWhen the backup was started. A final backup is marked at deletion
StatusRunning, Complete, Failed or Expired
SizeThe backup's size, once it is complete
Kept untilWhen its retention ends; the full that starts a day's chain is marked daily

A complete backup has an actions menu with Restore backup, which asks for the new database's name and then opens it (see Restoring a backup). Any member of the organization can restore, until the database's deletion grace period is over.

Failed and expired backups stay in the list for 7 days, so that an hour without a backup is visible rather than silently missing.

Backups taken before the service moved databases to its current storage engine are listed as they were last recorded, and cannot be restored.

Checking the recovery point from a script

GET /v1/databases/{databaseId}/backups returns the backups together with a status:

{
  "status": {
    "recoveryPoint": "2026-01-15T10:00:00.000Z",
    "recoveryPointAgeSeconds": 1800,
    "targetSeconds": 0,
    "isWithinTarget": true,
    "missedSlots": []
  },
  "backups": []
}

The numbers above are placeholders. targetSeconds is the recovery point the service aims for, isWithinTarget says whether the database is inside it now, and missedSlots lists the hours of the last 7 days that have no complete backup, once each has had time to complete. See backups in the API.

Restoring a backup

Restoring a backup creates a new database. The database the backup was taken from is left exactly as it is, so a restore never overwrites anything.

A backup is restored from the database's Backups page, or through the management API, with an API key for the whole organization and the admin role:

curl -X POST "$MIMIC_MANAGEMENT_API/v1/databases/$DATABASE_ID/backups/$BACKUP_ID/restore" \
  -H "Authorization: Bearer $MIMIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "production-restored"}'

The response is the new database, in the provisioning state. Follow its latestOperation, of kind restore_backup, until the database is ready.

The new database:

  • has a new ID and new addresses;
  • is in the same region, and on the same cluster, as the database the backup was taken from;
  • has the limits of that database's plan;
  • has no database keys and no token keys.

Only a complete backup whose retention has not ended can be restored, and the new database's name must be free. The new database counts towards the plan's maximum number of databases.

After a restore

Create credentials

Create database keys for the new database, and register its token keys again.

Point your application at it

Deploy the new database's addresses and keys. See connecting an application.

Decide what happens to the original

It is untouched. Keep it, or delete it once the restored database is serving.

If a restore fails

A failed restore is not retried. Delete the new database and restore the backup again.

Restore a backup, or restore a deleted database?

They are different things.

Restore a deleted databaseRestore a backup
WhenDuring the deletion's grace periodWhile the backup is complete and not expired, and its database's grace period is not over
ResultThe same database, as it wasA new database, as of the recovery point
Keys and addressesUnchangedNew; credentials are created again
Data since the last backupKeptNot included

If you deleted a database by mistake and its grace period has not ended, restore the database itself: nothing is lost.

After the grace period

Once a deleted database's grace period is over, its organization can no longer restore its backups: a request to do so is refused. The backups are still held until their retention ends, and during that time the service's operators can restore one into a new database on request. Such a restore is recorded in your audit log.