Backup and restore

Take a consistent backup of the whole cluster without stopping writes and restore it elsewhere.

teseladb admin backup copies every range at the same timestamp, so the backup is consistent even though writes carry on during the process.

Requirements

  • Access to teseladb admin on a node of the cluster.
  • Space in the --out folder for the files of every range.
  • To restore, a new, empty cluster.

Take a backup

Shell
teseladb admin backup --at now --out /backups/2026-11-03

The folder receives the SST files of each range exported at that timestamp and manifest.bson, with the SHA-256 of each file. --at accepts now or a seconds.increment timestamp.

Restore

Shell
teseladb admin restore --from /backups/2026-11-03

A restore runs on a new cluster, with no collections and a single data range. Before touching anything, the command checks the SHA-256 of every file; if one does not match or the cluster is not empty, it fails without changing anything.

With the MongoDB tools

To migrate from MongoDB or to MongoDB you can use mongodump and mongorestore, with --oplog and --oplogReplay. For backups of the cluster itself, teseladb admin backup is faster because it copies files, not documents.

Check

The backup folder has manifest.bson with the SHA-256 of each file. The only way to know a backup works is to restore it, so restore one now and then on a test cluster.

Common problems

  • restore fails without changing anything: the target cluster is not empty or the SHA-256 of a file does not match the one in manifest.bson. In the second case, the backup is damaged.

See also