Skip to content

Backups and restore

Backups are taken on demand. Scheduled backups are coming soon.

Open the database and click Backup in the header, or Create Backup in the Backups tab. The database must be running. The backup appears as Queued, then In progress, then shows its size when it’s done.

One backup per database runs at a time.

Engine Backup Restore
PostgreSQL Yes (SQL dump) Yes
MySQL Yes (SQL dump) Yes
MariaDB Yes (SQL dump) Yes
Redis Yes (snapshot) Not yet
RabbitMQ No No

In the Backups tab, click the restore icon on a backup and confirm. The backup is restored into the same database and overwrites its current data. You can’t restore while a backup is running.

Backups are kept until you delete them. Deleting the database deletes all its backups too.

Backups can’t be downloaded yet. For your own copy, use your engine’s tools, for example:

Terminal window
pg_dump "postgresql://USER:PASSWORD@HOST:PORT/DBNAME?sslmode=require" > backup.sql
Terminal window
# Start a backup (returns a backup_id)
curl -X POST "https://gw.dockhive.sh/api/v1/databases/$DB/backups?region=$REGION" \
-H "Authorization: Bearer $DOCKHIVE_API_KEY"
# List backups
curl "https://gw.dockhive.sh/api/v1/databases/$DB/backups?region=$REGION" \
-H "Authorization: Bearer $DOCKHIVE_API_KEY"
# Restore one (overwrites current data)
curl -X POST "https://gw.dockhive.sh/api/v1/databases/$DB/backups/BACKUP_ID/restore?region=$REGION" \
-H "Authorization: Bearer $DOCKHIVE_API_KEY"