TDClaim database and cluster setup
Mod version shipped with FlammiCraft: 4.30.0
From TDClaim 4.28.0, dedicated servers use the shared MariaDB database when [database] has enabled = true in config/tdlibrary-database.toml. For multiple backends, enable [cluster] as well. Point every backend at the same database. Singleplayer and standalone servers with the database disabled use world storage.
World ID and initial import
- Back up the world directories and database. Test the import on a copy first.
- Give each independent world save a unique, permanent ID. TDClaim uses the shared top-level
world_idincluster-node.tomlor the existing value under[tdclaim]. If you set both, use the same value. Keep the ID when moving a world to a different backend. A standalone database server can generate its own ID. - Keep players out during the first import. TDClaim validates each world's
data/tdclaim_claims.datand imports it into the database. The original file stays as a pre-import copy. TDClaim records the completed import indata/tdclaim_database.txt. If an initial import was interrupted, the next start reuses the reserved ID indata/tdclaim_database_pending.txt. - Check claims, spawns, templates and pending sales for every world before letting players join. Starting fails if a world ID already holds different data or two templates have the same name and different contents. Resolve the conflict against the backups.
Stored data and backend behavior
- Claims, permissions, block rules, force-load areas, history, configured spawns and sales belong to their world save. Two independent Overworlds can have different claims at the same coordinates. Run each world save on one backend at a time.
- Permission templates and the claim-border display preference are shared. The player selector includes players on other backends and known players from the TDLibrary directory.
- Property purchases use the TDEconomy ledger and resume with the same purchase ID. TDClaim saves the result and pending notice together and keeps the notice until it appears in the active TDLibrary archive. The cluster inbox is available on every backend.
- Set both
forceLoadRequiresOnlineMember = trueandforceLoadUsesClusterPresence = trueto count members on other backends. The server running the world still manages its chunk tickets.
Outages and recovery
An imported world needs its database to start. During an outage, TDClaim keeps enforcing the last confirmed protection data and rejects failed writes. Refresh the view before retrying after a conflict or outage. Pending sales continue to use their existing purchase IDs.
From 4.30.0 TDClaim borrows its database connections from TDLibrary's shared pool. A save that waits more than one second for a row another server holds locked is refused like during an outage, and the connection stays usable. Previously the connection dropped after two seconds.
Back up world directories, TDClaim data and the TDEconomy ledger at the same point in time and restore them together. The original tdclaim_claims.dat contains the pre-import state. When moving a world to a different backend, take the world directory and its import marker with it.
Empty database after moving a world
A previously migrated world can initialize an empty claim database. Missing claims start empty. A stale pre-migration world file is not imported as current data. Loading stops if a previously registered world subsequently loses its document. The admin view resolves the creator and the players on each access page together.