Backups and restore
Backups are taken on demand. Scheduled backups are coming soon.
Create a backup
Section titled “Create a backup”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 |
Restore a backup
Section titled “Restore a backup”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.
Keep and delete backups
Section titled “Keep and delete backups”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:
pg_dump "postgresql://USER:PASSWORD@HOST:PORT/DBNAME?sslmode=require" > backup.sqlWith the API
Section titled “With the API”# 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 backupscurl "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"