Skip to Content
v2ConceptsBackups

Backups

Endee supports creating and restoring collection backups. Use them to migrate collections, recover from data loss, or snapshot a known-good state.

A backup captures one collection. Creating a backup is started on the collection and runs asynchronously; backups are listed, restored, and managed at the database level (the database owns its backups).


Create a Backup

Backups are created asynchronously. The call returns immediately; the backup runs in the background. While a backup is in progress, write operations are paused and only read/search operations remain active; writes resume automatically once it completes.

collection = client.get_collection("products") # Start a backup of this collection (async). collection.create_backup("nightly") # Poll until the running backup finishes. while client.active_backup().get("active"): pass # wait, then re-check

Only one active backup per database is allowed at a time.


List and Inspect Backups

client.list_backups() # all backups in this database client.backup_info("nightly") # metadata for one backup

Restore a Backup

Restoring always creates a new collection. It will not overwrite an existing one. The target collection name must not already exist.

client.restore_backup("nightly", "products_restored")

Restore always creates a new collection. To replace an existing collection, delete it first, then restore into a collection with the desired name.


Download, Upload, and Delete

Move backups between databases or store them externally as .tar archives.

client.download_backup("nightly", "/tmp/nightly.tar") # write to a local .tar client.upload_backup("/tmp/nightly.tar") # upload a .tar into this database client.delete_backup("nightly")

download_backup / upload_backup use the local filesystem. These are most useful from self-hosted or server-side environments where the client has filesystem access.

If the server crashes or restarts during a backup, the backup will not complete automatically. Start a new backup once the server is back up.