Backup and restore
A backup worth keeping has two halves: what the game owns, and what the plugins own.
What to back up
Section titled “What to back up”| Path | What | Changes when |
|---|---|---|
worlds/ |
Every world, one directory per level-name |
Continuously while players are online |
keys/server_identity_key.pem |
The server's identity key | Once |
allowlist.json |
The allow list | On allowlist edits |
plugins/ |
Plugin packages, including plugins/hosihikari/ |
On install and update |
config/hosihikari/ |
Server-side configuration overrides | On configuration edits |
data/hosihikari/ |
Data the framework hands to plugins | While plugins run |
The last three are the framework's. plugins/ is worth backing up even though it can be reinstalled: the exact package versions on a working server are part of what you are preserving.
Take one while the server is down
Section titled “Take one while the server is down”Stop the server, copy the paths above, start it again. This is the only method that cannot catch a half-written world.
Take one while the server is running
Section titled “Take one while the server is running”BDS can prepare a consistent copy of the world on demand. In the server console:
save holdsave querysave hold only asks the server to prepare; it returns immediately and the preparation runs in the background. Call save query repeatedly until it answers with a file list. Until then it reports that preparation is still in progress, and the files are not yet safe to copy.
The successful save query answer lists every file to copy and the length of each one. Copy exactly those files — not the whole worlds/ directory — and truncate each copied file to the length the server gave. The server keeps running during the copy, so a file can grow while you read it; the truncation is what makes the copy match the snapshot.
When the copy is finished, release the hold:
save resumeThen copy the framework paths normally. They are plain directories and are not covered by the world flush.
Restore
Section titled “Restore”- Stop the server.
- Replace
worlds/,keys/, andallowlist.jsonwith the copies. - Replace
plugins/,config/hosihikari/, anddata/hosihikari/. - Start the server and check the log for the framework taking over and for the plugin list.
Restoring an older plugins/ alongside a newer framework is the usual cause of a plugin being refused on api_version. Restore the framework and plugins from the same date.
What a backup does not cover
Section titled “What a backup does not cover”- The BDS binary and its own files. Keep the server archive you installed from.
- The .NET runtime. Reinstall it rather than copying it.
- Anything a plugin writes outside
data/hosihikari/. That path is the contract; a plugin that writes elsewhere is outside it, and you would need to know that plugin's layout.
