Skip to content

Backup and restore ​

Right-click a database and choose Backup / Restore. Both directions live in one tab.

Backing up ​

  1. Switch to Backup mode.
  2. Choose the output file.
  3. Include data — on for a full backup, off for a structure-only snapshot.
  4. Start.

A progress bar tracks the dump, and the result reports how many objects were written.

The output is a plain .sql file: CREATE statements plus INSERTs when data is included. You can read it, diff it, keep it in version control and restore it with any tool that speaks SQL — nothing about it is NabuSQL-specific.

Each table comes with its full structure — keys, indexes, sequences and identity columns, types — and its triggers, and the database's views, procedures and functions follow the tables. Foreign keys and triggers sit at the end of the file, so the restore neither trips over table order nor fires triggers on the restored rows. What a dump contains has the details per engine.

On MariaDB the file starts with the database's sequences, each set to continue where it stood, so a column defaulting to NEXTVAL keeps numbering without reusing a value — also when the backup is restored under a different database name. System-versioned tables come back versioned, with their current rows; their row history starts afresh. On MySQL and MariaDB, binary columns — images, files, VECTOR — are written byte for byte as hex literals.

Backups made with version 1.0.109 or older

On MySQL and MariaDB, those versions wrote binary values that were not valid text as the placeholder '<binary N bytes>' instead of their bytes. Such a backup restores without errors, but those cells hold the placeholder. If you keep backups of tables with images or files, make a new one.

Restoring ​

  1. Switch to Restore mode and pick the file.
  2. Set the options:
OptionEffect
Drop if existsDrop each object before recreating it. Needed when restoring over an existing database
Disable FK checksTurn off foreign key checks during the restore, so tables can load in any order
Continue on errorKeep going after a failing statement instead of stopping
  1. Start. Progress is shown as a percentage, with a running error count.

A restore can be cancelled while it runs.

When it finishes, NabuSQL reports how many statements succeeded out of the total and lists the errors it collected — you find out what did not restore instead of assuming everything did.

Restoring overwrites

With Drop if exists on, existing objects in the target database are dropped and replaced. Restore into a scratch database first when you are not certain what the file contains.

Quicker paths ​

  • Dump SQL file ▸ on a database or table (right-click) writes structure or structure+data straight out, without the backup tab. On tables it can also write a sample of the rows.
  • ▶ Execute SQL file on a database runs any .sql file, which is the manual equivalent of a restore.

Automating backups ​

Task scheduler can run a backup on an interval.

The scheduler only runs while NabuSQL is open

It is part of the application, not a system service. For unattended backups of a production server, use your platform's scheduler with mysqldump, pg_dump or an equivalent.

What a backup does not cover ​

A database dump contains that database. Server-level things — users and grants, server configuration, other databases — are not in it. For MySQL users and privileges, see User management.

A dump only restores onto the same kind of server

The file is written in the source engine's own SQL — its identifier quoting, its types, its AUTO_INCREMENT and ENGINE= clauses. Restoring a MySQL dump into PostgreSQL fails on the first statement. To move a database between engines use Data transfer, which regenerates the structure for the target instead of replaying the source's SQL.