-
Notifications
You must be signed in to change notification settings - Fork 2
Storage Migration
しろしゅん edited this page Mar 21, 2023
·
1 revision
このページでは旧バージョンのデータの読み込み方法や異なるストレージ間でのデータ移行について記載しています。
Box v3.1.6 以前から最新バージョンに移行するには BoxMigrator を使用する必要があります。詳しい移行方法については BoxMigrator のページをご覧ください。
v5.x.x での初回起動時に自動的に移行が行われます。
v5.0.0 以降、Yaml の他に SQLite や MySQL への保存がサポートされました。
それらのストレージ間でデータを移行するには以下の設定ファイルを migration.yml として plugins/Box の下に配置する必要があります。
migration-mode: true # 起動時に移行処理を実行するか。実行後、自動的に false に設定されます
source-storage: # 移行元ストレージの設定。設定方法は config.yml と同じです。詳しくは https://github.com/okocraft/Box/wiki/Installation-and-Setup をご覧ください
type: yaml
yaml:
directory-name: "data"
sqlite:
table-prefix: "box_"
filename: "box-sqlite.db"
mysql:
table-prefix: "box_"
address: "localhost"
port: 3306
database-name: "box"
username: ""
password: ""
target-storage: # 移行先ストレージの設定。設定方法は config.yml と同じです。詳しくは https://github.com/okocraft/Box/wiki/Installation-and-Setup をご覧ください
type: sqlite
yaml:
directory-name: "data"
sqlite:
table-prefix: "box_"
filename: "box-sqlite.db"
mysql:
table-prefix: "box_"
address: "localhost"
port: 3306
database-name: "box"
username: ""
password: ""