-
Notifications
You must be signed in to change notification settings - Fork 5
Migration from other controllers
Warning
Migrating from FAST is NOT supported.
This page will help you migrate your XASECO database to Trakman.
There is already a script that does all the hard work. You will only need to provide the script with the correct database credentials.
Firstly, you must create a database that you will migrate all the data into. This is discussed in the video tutorial, and can also be found freely on the internet, e.g. here.
You can get the files here.
git clone https://github.com/wsrvn/xaseco-database-migration.git --depth 1
- Done. You can skip to configuration now
- Go to the project main page
- Click the green button that says "Code"
- Select the "Download ZIP" option
- Extract the downloaded archive wherever you like. Skip ahead to configuration
Firstly, go into the directory with the script source code, either via cd xaseco-database-migration
in terminal/powershell or via your file explorer.
There, start off by copying the file .env.example
to .env
, usually done with the command cp .env.example .env
in the terminal/powershell. This file holds all the database data that is used for the migration process.
Inside .env
the configurable values are split into categories:
Variable Name | Value Type | Description |
---|---|---|
MYSQL_HOST |
Valid IP address | MySQL database host |
MYSQL_USER |
String | MySQL database user |
MYSQL_PASSWORD |
String | MySQL database user password |
MYSQL_DATABASE |
String | MySQL database name |
Variable Name | Value Type | Description |
---|---|---|
POSTGRES_HOST |
Valid IP address | PostgreSQL database host |
POSTGRES_USER |
String | PostgreSQL database user |
POSTGRES_PASSWORD |
String | PostgreSQL database user password |
POSTGRES_DATABASE |
String | PostgreSQL database name |
POSTGRES_PORT |
1-65535 | PostgreSQL database host port |
Variable Name | Value Type | Description |
---|---|---|
MIGRATE_PLAYERS |
YES/NO | Whether to migrate the players table. Note that this one is mandatory |
MIGRATE_RECORDS |
YES/NO | Whether to migrate the records table (NOT rs_times ) |
MIGRATE_VOTES |
YES/NO | Whether to migrate the rs_karma table |
MIGRATE_BEST_SECTORS |
YES/NO | Whether to migrate the secrecs_all table (enable ONLY if you use the XASECO secrecs plugin) |
MIGRATE_ALL_SECTORS |
YES/NO | Whether to migrate the secrecs_own table (enable ONLY if you use the XASECO secrecs plugin) |
MIGRATE_DONATIONS |
YES/NO | Whether to migrate the players_extra.donations table |
Warning
Choosing to migrate the sector records table without having the secrecs_all
or secrecs_own
table (created by the XASECO secrecs plugin) in the MySQL database will crash the script.
Prior to first launch, make sure the provided data is correct, otherwise the migration script will fail.
Open the terminal/powershell in the root directory of the project (where you unpacked the code or what directory git cloned it into), after that:
- Execute
npm i
, this will install all the project dependencies.
Tip
If you don't have the npm command available, but have installed NodeJS, it is likely that it was not added to your $PATH. Usually, logging out and back in fixes this.
- Execute
node Migrate.mjs
. - Wait until the process is complete, the time it takes depends on the size of your MySQL database and whether you have sector migration enabled.
If no errors popped up, that means the migration (most likely) went smoothly. You can now proceed to the controller installation page in case you have not already. Should the script have a hiccup, you can report that in the issues section of the script repository.