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.
world, and on Paper and Spigot also world_nether and world_the_end, plus any extra worlds you created.server.properties, ops.json, whitelist.json, banned-players.json and the server software's own config files.The server jar and logs are not important; you can always download the jar again.
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.
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.
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.
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.