Define world consistency requirements
A consistent backup captures files that belong to the same saved point. A copy made while Minecraft or a plugin is writing can mix older and newer data. For example, the copy can contain a player file from after an item trade and a world file from before it. We recommend a clean shutdown for your first backup and before a major update.
.mca contains world terrain before item tradeplayerdata/UUID.dat contains inventory after item tradeActiveState=inactive ensures static lock on world treePrerequisites and supported versions
The commands below are for a self-managed Java Edition server on Linux with systemd, Bash, and GNU command-line tools. The example uses a Paper server with all its files under one directory and no external plugin database. Use your installed Paper build and the Java version it requires. Paper's 26.1 and later series requires Java 25 according to its current setup guide. PaperMC setup guide
Before you start, record the exact Minecraft build, Java version, server directory, service name, and plugin or mod versions. Check that you can stop the service cleanly. Set aside local space for an uncompressed archive and space on a separate host for a second copy. If the service can restart through a panel, watchdog, or other job, prevent that during the copy.
Start with a known world. Write down the active world name, the coordinates of a build in each enabled dimension, and the items in a test player's inventory and Ender Chest. Use this record when you test the restore.
What files does a Minecraft server backup need?
Check level-name in server.properties. The examples below assume the level name is world. Check the actual server directory, including any custom worlds or paths your startup command or plugins use.
| Server type | What to copy |
|---|---|
|
Java Vanilla Java Vanilla before 26.1 |
The full active world folder. Its Nether and End typically use DIM-1 and DIM1 inside that folder. |
|
Paper Server Paper before 26.1 |
The active world and the separate dimension folders when present, such as world_nether and world_the_end. Include worlds loaded by plugins. |
|
26.1+ Modern Java Vanilla or Paper 26.1 and later |
The complete active world tree, including dimensions/minecraft/ for the default dimensions and players/data/ for player records. Confirm the paths on your build. Keep all plugin-managed worlds as well. |
|
Bedrock BDS Bedrock Dedicated Server |
The full active level under worlds/, including its db/ directory. Keep server settings, access lists, and any required resource or behavior packs with a full server backup. |
Sources for the layouts and edition differences. Minecraft Java 26.1 release notes · PaperMC migration guide · Minecraft Bedrock server setup
/srv/minecraft DOES NOT BACK UP remote database records! Requires synchronized mysqldump.
A world backup holds the map, builds, chunks, and world-managed player data. A full server backup also keeps the startup files, server settings, access lists, plugins or mods, and their data. Keep the exact server and mod loader builds for Forge or Fabric. A modded world can depend on those builds for its blocks and items.
Check where plugins store claims, balances, homes, and permissions. If they use a separate database, export it while the relevant writers are stopped or through a backup procedure that coordinates those writers. Keep the export with the matching world archive. A file copy of the server directory does not capture a remote database.
Create scheduled off-host backups
The example stops the server only for the local archive. It starts the server again before copying the archive off-host. Use a maintenance window. An uncompressed archive can still take time when the world is large or the disk is busy.
Configuration and expected output
Use a private staging directory outside the server tree. Mount a dedicated directory from a separate backup host at /mnt/minecraft-backups. Restrict access to both locations because the archive can contain credentials and player data. Use encrypted transport and protect the backup host with its own retention policy.
Replace the paths and service name in the script. Before the first run, confirm that the server service shuts down cleanly and that the server tree contains every file you need. GNU tar archives symbolic links as links. If data lives behind a link or outside the tree, capture that data separately and record where it belongs.
Save the script as /usr/local/sbin/minecraft-backup. Give the service operator permission to run it. The example assumes an administrator runs it and the source is a trusted local server directory.
#!/usr/bin/env bash
set -euo pipefail
umask 077
service=minecraft.service
source_dir=/srv/minecraft
local_dir=/var/backups/minecraft
remote_dir=/mnt/minecraft-backups
install -d -m 0700 "$local_dir"
exec 9>"$local_dir/backup.lock"
flock -n 9 || { echo "Another backup is running" >&2; exit 1; }
mountpoint -q "$remote_dir" || { echo "Backup mount is missing" >&2; exit 1; }
test -f "$source_dir/server.properties"
systemctl is-active --quiet "$service" || {
echo "Server is not running. Check it before backing up." >&2
exit 1
}
local_run=$(mktemp -d "$local_dir/$(date -u +%Y%m%dT%H%M%SZ)-XXXXXX")
run_id=${local_run##*/}
restart_needed=0
cleanup() {
status=$?
if (( restart_needed )); then
systemctl start "$service" || status=1
fi
if (( status != 0 )); then
printf 'Backup failed. Check %s and the service log.\n' "$local_run" >&2
fi
exit "$status"
}
trap cleanup EXIT
restart_needed=1
systemctl stop "$service"
test "$(systemctl show -p ActiveState --value "$service")" = inactive
test "$(systemctl show -p Result --value "$service")" = success
tar -C "$source_dir" -cf "$local_run/server.tar" .
systemctl start "$service"
systemctl is-active --quiet "$service"
restart_needed=0
(
cd "$local_run"
tar -tf server.tar > archive-files.txt
sha256sum server.tar archive-files.txt > SHA256SUMS
)
mountpoint -q "$remote_dir"
pending=$(mktemp -d "$remote_dir/.incoming-$run_id-XXXXXX")
cp "$local_run"/{server.tar,archive-files.txt,SHA256SUMS} "$pending/"
(cd "$pending" && sha256sum -c SHA256SUMS)
mv -T -- "$pending" "$remote_dir/$run_id"
printf 'Backup complete: %s\n' "$run_id"
Run the script once during a maintenance window. In a successful run, the checksum check reports OK for both files and the script prints the backup ID. Check the Minecraft console for the normal startup message, then join the server. An active systemd service can still be loading the world.
Use only completed backup directories. A directory starting with .incoming- marks an upload that has yet to pass the checksum check. Keep the last verified copy if the new run fails. Check local and remote free space before each run, and set a separate cleanup policy for staging files and incomplete uploads.
Once the manual run passes, schedule the script under the same administrator account. For example, add the line below to that account's crontab for 4:30 a.m. in the scheduler's time zone. Route job output to a monitored log or configure working cron mail. Alert on failed jobs and on a missing recent success.
30 4 * * * /usr/local/sbin/minecraft-backup
Can you back up a Minecraft server while it is running?
Yes, if your edition and backup tool can make a consistent copy. Use a clean stop if you are unsure what still writes to disk.
Java Edition. The server commands are save-off, save-all flush, and save-on. Wait for the flush to succeed before taking a copy or snapshot. Turn saving back on after capture, even if the copy fails. Plugins and separate databases can still write during this process. Use an edition-aware tool or a clean shutdown when you need a consistent full-server backup.
Bedrock Dedicated Server. Use its own save hold, save query, and save resume workflow. Wait for the ready response. Use a tool that honors the file list and lengths returned by the server for the copy, then resume saving. For a manual full-server copy, stop the server first.
Hosted panel. Check which files the panel includes and whether restore replaces files or leaves old files in place. Download one copy you can reach if the panel goes offline. For Realms, use the Realm backup controls.
Command references. Minecraft Wiki save commands · Microsoft Learn Bedrock save command
Retain versions and protect credentials
Choose how much play you can afford to lose. If four hours of play would be hard to replace, a nightly backup leaves too much time between copies. Schedule backups around that limit and alert when the newest usable copy is older than planned.
Keep copies for different recovery needs
For a small server that can accept up to a day of lost progress, an example policy is seven daily copies, four weekly copies, and a separate copy before each major update. Keep the pre-update copy until the new build passes your checks. Keep older copies if griefing or a plugin error could go unnoticed for weeks.
Give the backup destination separate access controls. If your storage supports retained snapshots or deletion protection, use it to keep at least one older copy that the game host cannot erase. Keep the credentials needed to recover the backup available to a second authorized operator.
Check the archive, the file list, and the world
Check the bytes. After downloading the backup, run sha256sum -c SHA256SUMS from the backup folder. Stop if either check fails.
Check the contents. Compare archive-files.txt with your list of required files, worlds, and dimensions. Check for the database export if your setup requires one.
Check the game. Boot the copy on a private instance. Join and check known player and world data. A checksum confirms that the downloaded bytes match the recorded copy. The join test tells you whether Minecraft can use it.
Run a recovery drill
Pick the newest verified backup from before the bad update, disk failure, or unwanted change. Record the timestamp and tell players which period of progress the restore will replace.
Restore a Minecraft server backup to a separate instance
Keep the current state. If you plan to replace a live instance, keep players out. Stop it cleanly. Preserve its files and any linked database state before changing paths or replacing files.
Retrieve the backup. Start timing when you begin retrieval from the off-host destination. Check its checksum. Inspect the archive list and reject unexpected paths or links. Use archives from a trusted source.
Extract to a new directory. Use an empty directory owned by a test account. Extract as that account with tar --no-same-owner -xf /path/to/server.tar -C /path/to/empty-restore-dir. Check permissions and the configured level-name before the first start.
Match the old environment. Use the backed-up Minecraft build, Java version, mod loader, and plugin or mod versions. Restore any matching database export to a separate test database. Check startup paths and credentials. Keep the test instance away from live databases, webhooks, proxies, and other services that could receive test changes.
Start the private server. Use a different port if both instances share a host. Restrict network access and allow only the test users. Watch the console for world load errors and missing plugins or mods.
Check that players can join and their data loads
Join with a compatible client and a known player account. Compare the restored world with your record. Check spawn, a known build, and the Nether and End if enabled. Check that the player has the expected items, Ender Chest contents, and location. If the server uses claims or an economy plugin, check a known claim or balance too.
Stop timing when those checks pass. Record the server build, world size, archive size, download time, extraction time, startup time, and total time to a successful join and data check. Also record the test date, host CPU, RAM, and storage setup. If you run the test again after an update, record what changed. Use the measured time to plan your maintenance window.
Rollback and maintenance
If any required check fails, keep the restore private. For a failed cutover, stop the replacement instance. Put the preserved files and matching database state back as a set. Start the original build. Repeat the join and data checks before reopening access.
If players already joined the replacement server, record any new progress before you roll back. The preserved state will not include those changes. Assign a backup owner and repeat the drill after major changes to Minecraft, plugins, mods, or storage.
| Restore symptom | First check |
|---|---|
| The server starts a fresh world | Compare level-name with the actual folder, its location, and the server user's permissions. |
| The Nether or End is missing | Check the file list against the layout for that server build. |
| A player has an empty inventory | Check the player files and whether the server or proxy identifies the player with the same UUID as before. |
| The server exits at startup | Read the first relevant error. Check the Java version, mod loader, dependencies, and file permissions. |
| The checksum fails | Stop. Retrieve another verified copy and check it before extraction. |
level-name in server.propertieschown -R minecraftplayerdata/*.datsha256sum -c reports FAILED on server.tarBefore you reopen: Confirm the archive check passed, the expected world loaded, a player joined, the required in-game checks passed, and the rollback copy is still available.
If you need a separate recovery host or more room for backup copies, we can size a setup around your region, player count, world size, and recovery window. Explore Atal Networks dedicated game servers
Frequently asked questions
Yes, if it includes the active world's player data and any plugin data that stores or changes inventories. Restore the matching files and keep the same player identity setup. Check an actual player's inventory before reopening.
Yes. Use the same edition, server build, runtime, and plugins or mods for the first boot. Update paths and permissions on the new host and test a player join before moving traffic.
Only if you have another usable copy or a record of those changes. Check for a newer snapshot or a separate plugin history before you overwrite the current files. A backup only returns the data it captured.
Schedule backups based on how much play you can afford to lose. Also take a separate backup before you update the game, change the modpack, or move hosts. Check the timestamp of the last successful copy regularly.
Ready to Upgrade or Isolate Your Minecraft Architecture?
If you need a separate recovery host or more room for backup copies, we can size a setup around your region, player count, world size, and recovery window.