Backup
Requires Premium
Backup is a Premium feature.
A backup is only worth something if it restores. Backups… takes one and then proves it: the file is read back and checked, and on request it is restored into a database made for the purpose and compared table by table with what was backed up. A backup that passes that check is stamped Verified.
Open it from Tools → Backups…, the command palette, or right-click a database → Back up….
Taking a backup
- Check the folder. The default is
~/Documents/ElyraSQL Backups. The file is named after the connection, the database and the time, for examplestaging-shop-2026-11-12-10-03-55.sql, and only you can read it. - Leave Then test-restore it on, and pick where (see below).
- Click Back up. Progress shows table by table, and Stop keeps no file.
All tables are read in one consistent snapshot (START TRANSACTION WITH CONSISTENT SNAPSHOT on MySQL and MariaDB), so the backup is the database as
it was at one moment, while the server keeps taking writes. The backup only
reads, so it is safe on production.
The file is plain SQL. It loads with Import SQL dump… in this client, with
the mysql command line, or with sqlite3 for a SQLite backup (take out any
DELIMITER lines first). It holds:
- every table's definition and rows. Binary columns are written as hex, so they come back byte for byte. Generated columns are left out, because the server computes them again.
- views, in an order that creates each after the views it reads.
- triggers, procedures and functions on MySQL and MariaDB; indexes and triggers on SQLite.
Scheduled events are not included. The backup's notes say so when a database has any.
How a backup is checked
The file
Right after it is written, and again whenever you click Check file, the file is read back statement by statement and compared with a checksum taken of every table's rows while they were written. The last line of the file lists what it holds. A file whose last line is missing was cut short.
This catches a file that was cut short, damaged, or edited since. A file that passes is stamped File checked.
You can also check a file that is not on the list, such as one copied from another machine: paste its path at the bottom of the dialog.
The test restore
Test restore goes further. It loads the file into an empty database, reads every table back, and compares the row count and a checksum of every value with the backup. This catches what the file check cannot: DDL the server refuses, a view or procedure that will not create, and values that come back different.
Where it restores:
| Backup of | Restored into |
|---|---|
| SQLite | A temporary SQLite file on this computer |
| MySQL, MariaDB | A new database, elyra_restore_check_…, on a connection you pick. It is dropped afterwards. The connection's user needs CREATE and DROP. |
| ElyraSQL | ElyraSQL has one database per server, so the restore needs a server whose database is empty, such as a local one in Docker. Everything the restore creates there is dropped afterwards. |
Production connections are not offered as restore targets, and are refused if asked. The restore runs on connections of its own, so your open tabs are not affected.
A backup whose tables all came back as they were backed up is stamped Verified. If something differs, the dialog lists the table and what differed. If the server adjusted a statement to what it accepts, or skipped one, that is listed too (see Import SQL dump).
Stamps
| Stamp | Means |
|---|---|
| ✓ Verified | Test-restored, and every table came back as backed up |
| File checked | The file reads back as written; not test-restored yet |
| ✗ Restore failed | The test restore stopped or found differences |
| ✗ Damaged | The file no longer matches what was written |
| ✗ File missing | The file is gone from where it was written |
| Not checked | Never checked |
A damaged or missing file outranks an earlier Verified. The restore proved the file that was there then, not what is there now.
On the server (ElyraSQL)
For ElyraSQL, the dialog also offers On the server (BACKUP TO). This is a
hot backup in ElyraSQL's own format, written by the server.
The path is on the server
The file is written on the server host, not on your machine. The path
must be writable by ElyraSQL, and the target must not already exist. The
client cannot read it there, so it cannot check it. Restore it with the
server's elyrasql restore command.
ClickHouse is backed up with its own BACKUP command or clickhouse-backup.