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.

Blocks and items in this guide

Totem Of Undying in MinecraftTotem Of UndyingSticky Piston in MinecraftSticky PistonGold Ingot in MinecraftGold IngotRedstone in MinecraftRedstonePiston in MinecraftPiston

All 5 of these are named in the guide above, starting with Totem Of Undying. Look them up in the item database.

More guides on this site

Guides that go with this one

How to Backup and Restore Your Minecraft World
Learn how to create reliable backups of your Minecraft world and restore them when things go wrong,...
Change Difficulty With Commands in Minecraft
<> The /difficulty command flips your whole world between peaceful, easy, normal, and hard in one line....
How to Fight a Zombie Horde at Your Door
Survive a night siege: hold a one-wide choke point, sweep through stacked zombies, and use Knockback to...
How to Make a Clock in Minecraft
A clock is four gold ingots and one redstone, and it reads the sky so you know the time and when to...
How to Make a Hidden Staircase in Minecraft
A hidden staircase uses sticky pistons to push steps out of a flat wall on a trigger, then pulls them...
How to Survive Hardcore Mode in Minecraft
Hardcore is one life, no respawn. Build a sealed first-night base, keep a Totem of Undying in your...
Hosting
Managed Hosting
Skip the setup: a managed server online in minutes.
Database
Command Reference
Syntax, arguments and examples for every command.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.