Choose storage
In config.yml, set storage.type to SQLITE, MYSQL or MARIADB. SQLite uses battlepass.db inside the mod folder. For MySQL or MariaDB, configure storage.mysql.host, port, database, username and password.
Use shared remote storage for a network. Changing storage type does not automatically migrate data; migrate before switching and restart to apply connection changes.
| Connection option | Usage |
|---|---|
| maximum-pool-size | Maximum connections |
| minimum-idle | Minimum idle connections |
| connection-timeout | Connection wait in milliseconds |
| idle-timeout | Idle time in milliseconds |
| max-lifetime | Maximum connection lifetime in milliseconds |
| keepalive-time | Maintenance interval in milliseconds |
Enable backups
In backups.yml:
backups:
enabled: true
run-on-startup: true
interval-minutes: 1440
max-backups: 7
This example keeps up to seven copies, backing up at startup and every 24 hours. interval-minutes: 0 disables the interval. Copies are stored in backups/sqlite/, backups/mysql/ or backups/mariadb/; remote databases use .sql.gz files containing BattlePass tables.
Restore progress
Stop the server, preserve its current state and restore a consistent backup. For SQLite, replace the database; for MySQL/MariaDB, import SQL into the correct database. Do not mix tables from different points in time.
Also copy configurations, the resource pack and the world. Restoring the pass does not remove delivered items or Pokémon: restoring older claim records can allow prizes to be received again.
UUID changes
On servers where UUIDs change, evaluate no-premium-bug.yml with trusted authentication. To link known progress, use /mbattlepass uuidlink UUID_ANTIGO SeuNick and reconnect. Verify the identity and previous UUID before linking. This feature concerns Minecraft identity rather than pass premium access.