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
- To export a full database backup via command line: mysqldump -h host -P port -u user -p databasename > backup.sql.
- Compress backup files into .sql.gz archives for long-term storage or transfers.
- To restore an SQL dump file: mysql -h host -P port -u user -p databasename < backup.sql.
- When importing large SQL dumps via GUI tools (like DBeaver), set maxallowedpacket options if handling blob data.
- Verify table counts and row totals match post-import.
Notes
- Regular automated SQL dumps protect critical user account data and game state records.
- Include --single-transaction flag in mysqldump commands to prevent locking active database tables during backup execution.
Related NodeFlux pages
- Connecting DBeaver, HeidiSQL, and External Clients to MariaDB — Connect external database management clients securely to your NodeFlux MariaDB instance.
- Managing MariaDB Database Users, Passwords, and Privileges — Create database users, grant granular table privileges, and manage authentication credentials in SQL.
- Connecting Node.js & Python ORMs (Prisma, TypeORM, Sequelize) to MariaDB — Configure Prisma, TypeORM, Sequelize, and SQLAlchemy to manage schema migrations on hosted MariaDB.