Sooner or later something goes wrong: a corrupted world, a bad plugin update, a griefer with too many permissions or a host that loses your files. A good backup turns a disaster into a ten-minute fix. Here is how to make backups you can actually rely on.
What to back up
- World folders:
world, and on Paper and Spigot alsoworld_netherandworld_the_end, plus any extra worlds you created. - The plugins folder: plugin data (claims, economy balances, ranks, shops) is stored here, and it is just as important as the world.
- Configs:
server.properties,ops.json,whitelist.json,banned-players.jsonand the server software's own config files. - Databases: if plugins store data in MySQL or another database, back that up too, at the same time as the files.
The server jar and logs are not important; you can always download the jar again.
Back up without corrupting the world
The safest backup is taken while the server is stopped. If it has to stay online, stop it from writing to disk while you copy the files. Run these in the console:
save-off
save-all flush
Wait until the console says the game was saved, copy the files, then turn saving back on:
save-on
Don't forget the last step, or the server will stop saving player progress.
Make it automatic
Backups you have to remember don't happen. Most hosts have scheduled backups in their panel; turn them on. On your own machine or a VPS, a small script run on a schedule can do the save-off and copy steps for you, and some backup plugins do it from inside the server. Keep several copies, for example a daily backup for a week and a weekly one for a month, so you can go back to before a problem started.
Keep a copy somewhere else
A backup on the same disk or with the same host disappears together with the server. Download a copy regularly or send it automatically to cloud storage or another machine. Compress the backup into an archive first to save space and time.
Test a restore
A backup is only good if you can restore it. Every now and then, unpack a backup into a separate test server, start it and check that the world, the plugin data and the player inventories are all there. It also tells you how long a real restore takes, which helps when players are waiting.
Restoring is also the right moment to plan ahead: read how to protect your server from griefing so you need your backups less often.