-
Notifications
You must be signed in to change notification settings - Fork 9
How to backup and restore Score data
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.
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
- Go to Server > Data Export menu.
- Select the
oagischema for the target database schema and check all checkboxes for tables. - Choose
Export to Self-Contained Fileoption 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 Transactionoption. 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 Exportbutton to proceed. - After the process is finished, you can find the dump file at a path specified on
Self-Contained Fileexport options.
menu_import_export
export
- Go to Server > Data Import menu.
- Choose
Import from Self-Contained Fileimport option and select the dump file you exported before. - Select
oagischema for the target database schema. - Click
Start Importbutton.
import
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)
mysqldump -h127.0.0.1 -uoagi -poagi oagi > score_dump.sql
mysqldump -h127.0.0.1 -uoagi -poagi oagi < score_dump.sql