-
-
Notifications
You must be signed in to change notification settings - Fork 82
Transferring data storage within plugin
VotingPlugin stores player votes, totals, and statistics in SQLite or an external SQL database. Back up the source and destination before converting.
| Type | Description |
|---|---|
| SQLITE | Local Users.db database; the release default for standalone servers |
| MYSQL | External MySQL, MariaDB, or PostgreSQL database; required for proxy networks |
The setting is DataStorage, not StorageType:
DataStorage: SQLITEFLAT remains a deprecated legacy conversion source in the code, but it is
not listed as a current storage choice in the 7.1.1 default configuration. Do
not select it for a new installation.
Keep DataStorage: MYSQL for all three external database engines, then select
the driver family with Database.DbType:
DataStorage: MYSQL
Database:
Host: 'database.internal.example'
Port: 5432
Database: 'votingplugin'
Username: 'votingplugin'
Password: 'replace-with-a-secret'
DbType: POSTGRESQLValid DbType values in release 7.1.1 are MYSQL, MARIADB, and
POSTGRESQL. A matching JDBC driver must be present:
DbType |
Driver class |
|---|---|
MYSQL |
com.mysql.cj.jdbc.Driver |
MARIADB |
org.mariadb.jdbc.Driver |
POSTGRESQL |
org.postgresql.Driver |
If the platform does not provide the driver, install the MySQLDriver build, which the released default configuration identifies as bundling all three. Keep database credentials out of screenshots and support logs, grant the database account only the permissions VotingPlugin needs, and restrict database network access to the server and proxy hosts.
The conversion commands copy user records between supported storage systems.
They do not change DataStorage for you or clear destination-only records.
Matching destination records can be updated, so always use backups rather
than treating conversion as a reversible merge.
| Command | Description |
|---|---|
/av convertfromdata <storage> |
Copy from the specified source into the currently configured storage |
/av converttodata <storage> |
Copy from the currently configured storage into the specified target |
For example, while DataStorage: SQLITE is active:
/av converttodata MYSQL
This copies SQLite user data into the configured external database. After it
finishes, stop the server, set DataStorage: MYSQL, and restart. Do not switch
storage or let new votes arrive while a conversion is running.
Run these commands from the console so progress and failures remain visible.
- Configure and test the destination connection before converting.
- Stop vote intake and other data-modifying activity during the copy.
- Review the complete console output; a final command message is not a substitute for checking earlier database exceptions.
- Verify representative totals, points, last-vote times, and streaks before reopening voting.
- Use
MYSQLfor large or multi-server setups. - Use
SQLITEfor small standalone servers. - Do not use
FLATfor a new installation.
Confirm the active storage in Config.yml under DataStorage and in the
startup log.
- Vote Milestones
- Vote Streak System
- Vote Reminders β Current System
- Legacy Vote Reminding
- Vote Broadcast System
- Vote Logging
- Webhooks
- Time Changes
- Month Date Totals
- VoteShop
- Rewards Overview β Start Here
- Reward System Concepts
- Reward File Format
- Where to Set Rewards
- All Reward Possibilities
- Reward Examples
- Delayed Reward Command
- World Example
- VotingPlugin-Specific Rewards
- Commands & Permissions
- API
- PlaceholderAPI Placeholders
- Minecraft Server Lists
- Bedrock Player Support
- Transferring Data Storage