Backup & Restore
Open a service's Backup & Restore tab.
Only services with something to back up have this tab: a PostgreSQL, MySQL or MariaDB database, or a service with a volume. A service deployed from an image, a Git repository or an upload with no volume, such as a web app, has no data on its server to back up: keep its state in a database or a volume.
Databases
For PostgreSQL and MySQL-compatible services, a backup runs pg_dump or mysqldump inside the running container and stores the dump. Download it, or restore it into this or another service. A restore runs the SQL against the live database and can partly apply if it fails.
A database backup or restore runs as a one-off job on your server. For a restore, the server downloads the backup from the control plane, checks its SHA-256, and only then runs it against the database through the service's private address, with the database's own client. For a backup, the server dumps the database and uploads the file, which the control plane checks before keeping it. The server needs outbound HTTPS access to the control plane, and free disk space for one copy of the dump (up to 2 GB) while the job runs.
Backups are stored gzip-compressed. A database backup is compressed on your server before it is uploaded, and a restore downloads the compressed file and decompresses it on the server after the SHA-256 check, so a dump crosses the network at a fraction of its size; SQL dumps usually shrink 5 to 10 times. The server needs room for the dump and its compressed copy while the job runs. The backup list shows the stored size and the size uncompressed, and a download is a .sql.gz or .tar.gz file. Backups made before compression was added are compressed in the background, one at a time; until then they restore as before. A compressed backup gets a new SHA-256 and downloads as .sql.gz, and its previous off-site copy is kept for 7 more days.
If the database's container stops or is replaced during a backup or restore, for example by a restart or a deploy, the job fails with the database's error, and jobs queued behind it run. A restore that takes longer than an hour plus a second per MiB of the dump is stopped, and so is a backup after six hours. If the control plane restarts meanwhile, the job carries on on the server and is picked up again. Volume backups and restores still stream through the control plane and fail after 30 minutes without data moving. A queued or running backup or restore can be cancelled through the API, which stops it on the server. Check the database after a failed or cancelled restore, or restore into a new database service.
A backup or restore waits only for a deploy of the whole project or of its own service, and for the project's other operations. Deploys of the project's other services carry on: they build meanwhile, and roll out once the backup or restore is done, as the server takes one change at a time.
Uploading a backup
Upload accepts:
- SQL from
pg_dump,pg_dumpallormysqldump, plain or gzip-compressed (.sql,.sql.gz); - a Zeabur database backup (the
.zipZeabur downloads, even when it is named.sql.gz); - a
.taror.tar.gzfor a volume.
The upload is converted when it is stored. A PostgreSQL cluster dump (pg_dumpall, which is what Zeabur's PostgreSQL backups contain) becomes a restore of its one application database into this service's database:
- Roles are created if missing, with their passwords from the backup. Change them if the old platform's credentials may have been exposed.
- Superuser roles from the backup (Zeabur's
root) are restored without superuser rights or login, so an old admin password never becomes an admin login here. Objects they owned keep that owner. - The
template1andpostgresdatabases are skipped, and settings (including per-role settings such as a role'ssearch_path) and grants on the source database apply to this service's database. - A backup with several application databases is refused; restore each into its own service.
Before it writes anything, the restore checks two things and stops with a message if either fails:
- The service's PostgreSQL major version must be at least the backup's. A PostgreSQL 18 backup needs a PostgreSQL 18 service.
- The database must have no tables. A cluster dump creates tables and does not drop existing ones, so restore it into a new database service.
Volumes
A volume backup is a gzip-compressed .tar archive of the volume. The project must be stopped while it is taken or restored, and a restore needs an empty volume.
Off-site copies
Every backup you make, every automatic backup and every uploaded file is also copied to object storage in another location. The Off-site copy badge appears on a backup once its copy is stored; until then it shows Copying off-site, usually for a minute or two.
The copy is encrypted on the control plane before it leaves, so the storage provider can't read your data. If the control plane loses the backup file, a restore or download fetches the copy back first and checks its SHA-256 before using it. Deleting a backup, its automatic expiry, deleting its service (7 days after the deploy that removes it) or deleting the project removes the copy too.
Your responsibility
Backups are stored on Zenavo's control plane, separate from your server, with an off-site copy. A backup is not verified until you restore it somewhere and check the data. For important data, also keep your own copies, such as provider disk snapshots or downloads of your backups.