Skip to content

Navigation Menu

Sign in
Sign up

How to backup and restore Score data

Hakju Oh edited this page Oct 20, 2020 · 7 revisions

The following instructions describe how to create Score backups to keep data for purposes such as preparing Score upgrade. If you are familiar with making a dump from database schemas, you can skip this.

Although there are a lot of SQL client programs supported MySQL database, we recommend to use MySQL Workbench, a visual SQL development software powered by MySQL development team and it is available on Windows, Linux, and Mac OS X environments. Instead of using MySQL workbench, you can use mysqldump command in MySQL client programs. The next sections illustrate steps to create backup data in both ways.

Using MySQL Workbench

1. Connect to Score database

Connect to mysql on the host where Score database is installed.

Host: "127.0.0.1" (default)

User: "oagi" (default)

Password: "oagi" (default)

Default Schema: "oagi"

host

2. Use Data Export to back up.

  • Go to Server > Data Export menu.
  • Select the oagi schema for the target database schema and check all checkboxes for tables.
  • Choose Export to Self-Contained File option in export options. The path in the input text field will use to write data.
  • If you do not want to stop Score services, check Create Dump in a Single Transaction option. We strongly recommend to not use this option. Instead, make sure that no one can use Score services during making a dump file.
  • Click Start Export button to proceed.
  • After the process is finished, you can find the dump file at a path specified on Self-Contained File export options.

menu_import_export

export

3. Use Data Import to restore

  • Go to Server > Data Import menu.
  • Choose Import from Self-Contained File import option and select the dump file you exported before.
  • Select oagi schema for the target database schema.
  • Click Start Import button.

import

Using mysqldump command

Alternatively, you can use mysqldump command to make a dump file. Please see the MySQL installation instruction to obtain this. You also can find details at the mysqldump reference manual page.

The general syntax of mysqldump command is in the following,

shell> mysqldump [options] db_name

  • Options
    • -h: Hostname, "127.0.0.1" (default)
    • -u: Username, "oagi" (default)
    • -p: Password, "oagi" (default)
    • db_name: Database name, "oagi" (default)

1. Export

mysqldump -h127.0.0.1 -uoagi -poagi oagi > score_dump.sql

2. Import

mysqldump -h127.0.0.1 -uoagi -poagi oagi < score_dump.sql

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /