How to Back Up a Minecraft Server World and Restore It Safely
A copy of a running world can be half-written and useless. Here is how to back up a Minecraft server world properly, and how to prove the restore works before you need it.

Infrastructure & Support Team
On this page
To backup a Minecraft server world safely, tell the server to flush its data to disk, pause saving, copy the world folders, then turn saving back on. In console terms that is save-off, save-all flush, copy, save-on. Skip the first two steps and you may copy region files that are half-written, which is how people end up with a "backup" that crashes on restore.
This guide covers that sequence, a small script you can put on a schedule, what to keep off the server, and how to test a restore. None of it needs special tools, only shell access or a panel that lets you run console commands.
Why a plain copy of the world folder can fail#
Minecraft keeps most of the world in memory and writes chunks to disk gradually. If you copy the folder while that is happening, some region files can be mid-write. The copy often looks fine, then a chunk fails to load a month later, when you actually need the backup.
The Minecraft wiki describes the three commands that solve this. save-all flush saves all players and chunks to storage immediately, briefly freezing the server, whereas plain save-all only marks chunks to be saved gradually. save-off stops the server writing level files so you can copy them, queuing changes meanwhile, and save-on turns writing back on.
All three need permission level 4 and work on dedicated servers, so run them from the console or over RCON, not as a normal player.
What to include in a Minecraft world backup#
The world alone is not the whole server. A restore is only painless if you also have the files that define how the server behaves.
- The world folders. The name comes from
level-nameinserver.properties, which defaults toworld. On Spigot-based servers the Nether and End are commonly stored as separate folders beside it, so check what is actually in your server directory rather than assuming. server.properties, plusops.json,whitelist.jsonand the ban lists.- The
plugins/folder with its configs and data folders. Economy, claims and permissions plugins keep their data there, and losing it hurts as much as losing the map. - The server jar version written down somewhere. A world saved by a newer version generally will not open cleanly on an older one, so note which version you were running. Our docs on changing server versions cover this side.
If you are working in a panel, the backups and restoration docs show what the panel can do for you; the rest of this article is for when you want your own copy too.
Step by step: a safe manual backup#
- Open the server console, see Docs: Server console if you have not used it yet.
- Run
save-off. - Run
save-all flushand wait for the "Saved the game" confirmation. On a big world this takes a few seconds, and players may notice a brief freeze. - Copy or archive the world folders and config files.
- Run
save-on.
Keep the window between save-off and save-on short. The wiki says changes made in the meantime are queued, so a long pause means more queued work and more memory held. A good habit is to copy to a folder on the same machine, run save-on, and only then compress and upload.
Always finish with save-on. The wiki notes that save-off is reset by a restart, but you do not want to depend on that.
Automate it: a cron script using RCON#
Doing this by hand works until the one day you forget. A script can do it nightly. It needs RCON, which lives in server.properties:
enable-rcon=true
rcon.port=25575
rcon.password=use-a-long-random-passwordThe wiki lists 25575 as the default RCON port and notes that RCON traffic is unencrypted, including the password, and that RCON will not start with an empty password. So never expose that port to the internet. Bind your firewall rules so only localhost can reach it; a firewall rule that allows only localhost is the usual approach.
Here is a minimal bash version using mcrcon (install it from your distribution or build it from source; check your own package manager). It always sends save-on, even if the copy fails:
#!/usr/bin/env bash
set -u
SERVER_DIR=/srv/minecraft
BACKUP_DIR=/srv/backups
STAMP=$(date +%F-%H%M)
RCON="mcrcon -H 127.0.0.1 -P 25575 -p $RCON_PASSWORD"
mkdir -p "$BACKUP_DIR"
trap '$RCON "save-on"' EXIT
$RCON "save-off" "save-all flush" || { echo "RCON failed, aborting"; exit 1; }
sleep 5
tar -czf "$BACKUP_DIR/world-$STAMP.tar.gz" -C "$SERVER_DIR" \
world world_nether world_the_end server.properties pluginsAdjust the folder names to match your server. Export RCON_PASSWORD from a root-only file rather than writing it into the script. Then schedule it, for example every night at 04:00 IST:
0 4 * * * /srv/scripts/mc-backup.sh >> /var/log/mc-backup.log 2>&1If you are unsure whether cron or a systemd timer suits you, we compared them in Cron vs Systemd Timer.
Prune old archives so the disk does not fill. A simple rule is to keep the last 7 daily archives and delete the rest:
ls -1t /srv/backups/world-*.tar.gz | tail -n +8 | xargs -r rm --Keep a copy off the server#
A backup in the same directory tree, on the same disk, protects you from a bad plugin or a griefer but not from losing the machine. Copy archives somewhere else after each run: another server, object storage, or even your own PC with rsync or scp over SSH. Our VPS backup docs page covers the basics of moving files.
For the transfer itself, rsync -avz /srv/backups/ user@backup-host:/path/ is enough for most small servers.
What LordCloud does and what you should still do#
LordCloud runs automated daily off-site backups on Cloudflare R2, separate from the hosting node, and keeps the most recent 7 daily backups. Restores go through a support ticket. That is a useful safety net, but it is a safety net, and you are still expected to keep your own backups, particularly before a risky change such as a version upgrade or a big plugin install. If you want a plan to run this on, see our Minecraft server hosting plans.
How to restore a Minecraft world safely#
Restoring is where backups get tested, so do it carefully.
- Stop the server. Never overwrite a world while the server is running.
- Keep the current state. Rename the existing world folder to something like
world-brokeninstead of deleting it. You may want to salvage builds later. - Extract the archive into the server directory so the folder names match
level-name. - Check the version. Start on the same server version the backup was taken on, then upgrade separately if needed.
- Start and watch the console for errors while the spawn area loads, then walk to a few far-away chunks and check the Nether and End.
If you have never done this, do a dry run now on a spare folder or a test server. A backup you have never restored is a hope, not a backup. A restore test also tells you how long recovery really takes, which matters when players are waiting.
Common backup mistakes#
- Forgetting
save-on. Use thetrappattern above so it always runs. - Backing up only
world. Nether, End and plugin data go missing. - Keeping all copies on one disk. One failure takes everything.
- No pruning. Archives pile up until the disk is full, and then the server itself cannot save.
- Exposing RCON. An open RCON port with a weak password is a remote console for strangers.
- Never testing a restore. Do it once a month, even for five minutes.
If lag is why you are touching the server at all, reading a spark report helps find the cause, and the performance optimisation docs cover the tuning side.
FAQ#
Short answers to the questions above are in the structured FAQ below. The main thing to remember is the order: save-off, save-all flush, copy, save-on, followed by an off-site copy and a restore you have actually tried.
Frequently asked questions
How do I backup a Minecraft server world while it is running?
Run save-off, then save-all flush, copy the world folders, then run save-on. The flush forces everything in memory onto disk, and save-off stops new writes while you copy, so the copy is consistent.
How often should I back up my Minecraft server?
Daily is a sensible minimum for a small community server. If players build a lot, add a short-interval local backup, for example every few hours, and keep fewer of those than your daily ones.
Is copying the world folder enough to restore a Minecraft server?
Usually yes for the world itself, but also keep server.properties, plugin folders and configs. On Spigot-based servers the Nether and End are often separate folders next to the overworld, so copy all of them.
Does save-off stay on after a restart?
No. The Minecraft wiki notes the setting resets when the server restarts, but you should still always run save-on after your copy so saving is not left off.
Do I still need my own backups if my host makes backups?
Yes. Host backups are a safety net, not a replacement for a copy you control and have test-restored yourself.
References
Drafted with AI assistance and checked against LordCloud's published product information. Spotted a mistake?Suggest an edit.



