Skip to content
Hosting · Files, backups and database

Dumping and restoring a database

How to back up MySQL, what to restore with, what should be included in the backup, and how often to do it.

Updated August 13, 2026

A world backup doesn't contain the database: permissions, economy, bans and logs live separately.

Taking a dump

Through a client (HeidiSQL, DBeaver) — export the database to .sql. Through the console:

mysqldump -h HOST -P PORT -u USER -p DB_NAME > backup.sql

Restoring

mysql -h HOST -P PORT -u USER -p DB_NAME < backup.sql

Stop the server before restoring: otherwise plugins will overwrite the restored data with their cache.

What matters

  • Take the dump on a stopped server or at least during a quiet period: otherwise some tables will be from different points in time.
  • Store dumps off the server: a copy next to the original won't save you from disk loss.
  • Test your restore at least once: an untested backup isn't a backup.

How often

DataFrequency
Permissions and groupsOn changes + once a week
EconomyDaily
BansWeekly
CoreProtect logsOptional, they're partially recoverable

Automation

You can take dumps on a schedule with your own script, or export them manually through a client before major changes — Backup strategy.

Minecraft hostingYour server runs while you are offlineCreate server