Skip to content

Backing Up Your Database

Bryce Mecum edited this page Feb 5, 2024 · 22 revisions

Warning

This page is a draft and isn't to be treated as guidance of best practice.

It's also not complete.

Backing up a database where user data is involved is a complicated business and there's no such thing as a one-size-fits-all approach. This warning can be removed once this page has been filled in more completely.

Note

This page needs people with more knowledge to answer these questions:

Using MySQL Workbench

  1. Open MySQL Workbench

  2. Connect to your database

  3. In the Server menu, select Data Export

    01
  4. In the "Administration - Data Export" pane that appears,

    • Under Tables to Export, select ace_auth, ace_shard, and ace_world.
    • Under Export Options, switch to "Export to Self-Contained File"
    • Check "Include Create Schema"
    • Click "Start Export"
    02
  5. You should see something like the following:

    03

This prints the following

18:14:34 Dumping ace_auth (all tables)
Running: mysqldump.exe --defaults-file="C:\Users\User\AppData\Local\Temp\tmph0efqnz9.cnf"  --host=localhost --port=3306 --default-character-set=utf8 --user=root --protocol=tcp --skip-triggers "ace_auth"
18:14:34 Dumping ace_world (all tables)
Running: mysqldump.exe --defaults-file="C:\Users\User\AppData\Local\Temp\tmphsxcn7zm.cnf"  --host=localhost --port=3306 --default-character-set=utf8 --user=root --protocol=tcp --skip-triggers "ace_world"
18:14:37 Dumping ace_shard (all tables)
Running: mysqldump.exe --defaults-file="C:\Users\User\AppData\Local\Temp\tmphi6q_30e.cnf"  --host=localhost --port=3306 --default-character-set=utf8 --user=root --protocol=tcp --skip-triggers "ace_shard"

Command Line

Browse to your wamp/bin/mysql/VERSION/bin folder, then run the following (changing the username (-u) and/or password (-p) as needed:

mysqldump -u root -p ace_auth > ace_auth.sql
mysqldump -u root -p ace_shard > ace_shard.sql

And if you have customized weenies (.sql files) or modified anything in ace_world, also run:

mysqldump -u root -p ace_world > ace_world.sql

How Coldeve does running backups

Notes

  • They use --single-transaction in their backup script (via @gmriggs)