Skip to main content
← All Guides
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
  1. 1
    Flush the world to disk
    In 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.
  2. 2
    Zip with a timestamp
    tar -czf world-$(date +%F_%H%M).tar.gz world/ gives a dated, compressed archive you can sort and prune by name.
  3. 3
    Keep a rolling set
    Store archives in ~/backups and delete anything older than 7 days: find ~/backups -name 'world-*.tar.gz' -mtime +7 -delete. Keep one weekly snapshot too.
  4. 4
    Automate with cron
    crontab -e and add 0 3 * * * /home/mc/backup.sh so it runs every night at 03:00 while almost nobody is online.
  5. 5
    Restore in one command
    Stop 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.
backup@astroworld: ~/servercron 0 3 * * *
$ ./backup.sh --world world
save-off & save-all→ world flushed to disk
tar -czf world-2026-06-20_0300.tar.gz world/
✓ archive written · 1.84 GB · verified checksum
~/backups/ · keep last 7
world-2026-06-20_0300.tar.gz1.84 GBtoday 03:00
world-2026-06-19_0300.tar.gz1.81 GByesterday
world-2026-06-18_0300.tar.gz1.79 GB2 days ago
world-2026-06-13_0300.tar.gz1.72 GBweekly keep
$ ./restore.sh world-2026-06-13_0300.tar.gz
✓ world rolled back · save-on· ready to start

What you need

World folder
Cron schedule
backup.sh script
Off-site copy

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.
Hosting
Skip the setup
Get a managed server with one click instead of configuring it all yourself.
Database
Block & item reference
Look up any block, item or command argument before you script around it.