Database Backups and Restores with mysqldump and SQL Scripts | NodeFlux.eu Docs

Export database snapshots using mysqldump and restore SQL backup scripts to your MariaDB service.

Steps

  1. To export a full database backup via command line: mysqldump -h host -P port -u user -p databasename > backup.sql.
  2. Compress backup files into .sql.gz archives for long-term storage or transfers.
  3. To restore an SQL dump file: mysql -h host -P port -u user -p databasename < backup.sql.
  4. When importing large SQL dumps via GUI tools (like DBeaver), set maxallowedpacket options if handling blob data.
  5. Verify table counts and row totals match post-import.

Notes