Skip to content

LiteBans migration

PunishSync can import bans from a LiteBans database (MySQL, MariaDB or H2) since 0.11.0.

  • Back up the LiteBans database.
  • Keep LiteBans installed during the import; PunishSync reads its connection settings from plugins/LiteBans/config.yml.
  • Decide how LiteBans reasons map to PunishSync categories.

plugins/PunishSync/import.yml:

reasons:
"(?i)hack|cheat|fly|killaura": cheating
"(?i)grief": griefing
"(?i)spam|toxic|chat": chat-abuse
default: other
publish: false # import as local bans, do not share with the federation

Patterns are regular expressions, checked in order. Anything unmatched gets default.

/psync import litebans --dry-run

The dry run prints how many bans fall into each category. When the numbers look right, run it again without --dry-run. Imports run in batches of 5,000 and can be resumed.

  1. Stop the server, remove LiteBans, start again.
  2. /psync record <player> for a few known players to check their bans came over.
  3. If you want imported bans to reach your federation, set publish: true and run the import once more; already imported bans are published, not duplicated.