Setup
CobbledSync requires Crib, which requires Rib, which requires LuckPerms. CobbledSync uses Crib to communicate with Redis/Mongo, so you must setup the database URLs in Crib's config (/config/crib/config.json). If you've already used a cross-server roanoke.dev mod, you already have that setup.
After Crib's setup, CobbledSync just works. If you're launching a new server (or resetting), you're now done. Data will be saved/loaded/synced across the network via Redis & Mongo. If you're migrating from a single-server setup (with local (nbt/json) Cobblemon storage), or from a different sync solution (Pebble's cobblemon-sync, moving is still easy).
Migrating from Pebble's cobblemon-sync
CobbledSync uses the same names & data formats (both use Cobblemon's) for MongoDB database/collection. If you never changed the Cobblemon config where the MongoDB database name is defined (defaults to 'cobblemon'), simply replace the cobblemon-sync jar with CobbledSync (after setting up Crib). If you did change that, just change it in CobbledSync's config too (/config/CobbledSync/config.json).
Migrating from local storage (single server setup)
Cobblemon stores it's data (PCs, Parties, Pokedex, General Data (i.e. starter chosen)) in "flat files", aka normal text files (json) or binary files (nbt). You can configure CobbledSync to pull data from those local files, if data isn't found in its database, in order to migrate data. You can do this by changing 'migrateFromLocalStorage' to true in /config/CobbledSync/config.json.
However, in order to pull that data, it must be present on that server's local world folder. Lets say you start with a server called CoolMons. You're hitting high player counts and want to switch to a cross-server solution. You plan to have three servers - one for your spawn, and then two for normal playing (i.e. exploring, building).
You would split CoolMons into three servers, which we'll call:
Spawn
Alpha
Beta
CobbledSync will be on each server, and when a player joins the network for the first time, they'll join one server - CobbledSync will then pul the local data from that server and put it in the database. You need to ensure that the local data (i.e. the /world/pokemon folder) is present on all servers. You could force players to join one server with a proxy mod, which has the world data, ensuring CobbledSync can migrate it, but if that server goes down they'll be sent to a different one. It's safer to copy the data to all servers on the network just in case.
Last updated