TMDevelopmentTinulica & Maiky

Storage and migration

Storage and migration

storage.typeWhereWhen
yaml (default)plugins/FlareReferrals/data.ymlone server, nothing to set up
sqliteplugins/FlareReferrals/data/data.dbone server with many players
mysqlMySQL or MariaDBneeded to link several servers

The SQLite and MySQL / MariaDB drivers are already in Spigot and Paper.

storage:
  type: mysql
  mysql:
    host: localhost
    port: 3306
    database: flarereferrals
    username: root
    password: ""
    properties: "useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=utf8"
    table-prefix: "fr_"

Create the database first. The plugin creates the tables (fr_meta, fr_players, fr_rewards, fr_events). On Pterodactyl: the server's Databases tab gives host, port, name, user and password.

Moving your data: /referrals migrate

  1. Put the settings of the new storage in config.yml. Leave storage.type as it is.
  2. /referrals migrate <yaml|sqlite|mysql>: shows what it will copy, changes nothing.
  3. Run the command it shows, ending with confirm. Referrals and rewards pause, everything is copied.
  4. storage.type is set for you. Restart the server.

The old data stays as a backup. If the new storage already has players the copy is refused (see merge, Network).

Safety

  • A database set up by a newer FlareReferrals is never touched by an older one: the plugin stops and says so.
  • If the database can't be reached at start, the plugin stays off: it never falls back to data.yml, which would split your data. While running, a short database outage only means "can't be saved right now": nothing is saved half-way.

Actualizat ultima data pe 25 octombrie 2026