Restore
A backup is the dump and its completion record (see Storage).
-
Download both, for example with
aws s3 cp s3://<bucket>/<key> .or withsftp. -
Check the dump against the record:
Terminal window echo "$(jq --raw-output .sha256 20261022T134500Z-<run id>.json) 20261022T134500Z-<run id>.dump" |sha256sum --check -
Restore it into a new database with the native client.
PostgreSQL
Section titled “PostgreSQL”createdb --template=template0 app_restoredpg_restore --exit-on-error --dbname=app_restored 20261022T134500Z-<run id>.dumpThe dump has no roles, tablespaces or other global objects. The roles that own objects or have grants in the dump must exist before the restore.
mysql --defaults-extra-file=restore.cnf --execute='CREATE DATABASE app_restored'mysql --defaults-extra-file=restore.cnf app_restored <20261022T134500Z-<run id>.sqlrestore.cnf is an option file with [client], host, user and password, readable only by you, so that no argument holds the password.
The dump names no database, so it restores into the database that you give.
It has no accounts or grants, and the accounts in its DEFINER clauses must exist.
A dump from a replica restores its events disabled: see MySQL replica.