Server Admin
How to Back Up Your Minecraft Server
A corrupted world or a botched plugin update can wipe weeks of building. The fix is boring and bulletproof: flush the world to disk, zip it with a timestamp, keep a rolling set of snapshots, and let cron run it nightly. Here is the exact setup, plus the one-line restore.
The safe-backup rule
- 1Flush the world to diskIn the server console run save-off then save-all so no chunks are mid-write, then copy. Run save-on again the moment the archive is done.
- 2Zip with a timestamptar -czf world-$(date +%F_%H%M).tar.gz world/ gives a dated, compressed archive you can sort and prune by name.
- 3Keep a rolling setStore archives in ~/backups and delete anything older than 7 days: find ~/backups -name 'world-*.tar.gz' -mtime +7 -delete. Keep one weekly snapshot too.
- 4Automate with croncrontab -e and add 0 3 * * * /home/mc/backup.sh so it runs every night at 03:00 while almost nobody is online.
- 5Restore in one commandStop the server, extract the chosen archive over the world folder: tar -xzf world-2026-06-13_0300.tar.gz, then start back up. Test a restore before you need one.
What you need
Quick answers
?
Do I have to stop the server to back up?
No. Run save-off then save-all to flush chunks to disk, copy or tar the world while it is paused, then save-on. You only need a full stop to restore.
?
What exactly should I back up?
At minimum the world, world_nether and world_the_end folders. Better: the whole server directory so plugins, configs and player data come back together.
?
How often should backups run?
Nightly via cron at 03:00 is the baseline. Busy survival servers run hourly. Always add a manual backup right before any update or plugin change.
?
Where should I store the archives?
Not on the same disk as the server. Push a copy off-site with rclone to cloud storage or scp to another box, so one dead drive cannot take both.
?
How do I restore a world?
Stop the server, delete or rename the broken world folder, run tar -xzf world-DATE.tar.gz, then start the server. The named timestamp tells you which day you are rolling back to.
?
How long do backups take?
A 1-2 GB world compresses in well under a minute on a modern host. tar -czf does the gzip for you; use -I 'zstd' if you want faster compression on big worlds.