Copy a Minecraft world to or from a server without breaking it

Move a world between your computer and a server with scp, rsync or an SFTP app, and avoid the usual traps: world/world folders, half-merged copies, a server still running, and Paper's split Nether and End folders.

Short answer: stop the server, put the old world aside instead of copying on top of it, then copy the whole folder in one go. From a terminal: scp -r user@server:/path/to/world ./ to download, scp -r ./world user@server:/path/to/ to upload. rsync does the same, faster the second time. The rest of this guide covers the traps that leave a world broken or half-copied.

Before copying

  1. Stop the server, or at least run /save-off then /save-all and wait for “Saved the game”. A running server keeps rewriting region and player files, and a copy taken in the middle of a write is damaged. Run /save-on afterwards.
  2. Find the world's real name: it is level-name in server.properties, world by default.
  3. Keep the old copy: rename it (mv world world-old) rather than copying over it. You delete it once the new one works.

The world/world trap

With scp -r and cp -r, the result depends on whether the destination already exists:

  • scp -r user@server:/srv/mc/world ./Desktop/world creates Desktop/world if it doesn't exist yet, but if it does, you get Desktop/world/world, which Minecraft can't open.
  • scp -r user@server:/srv/mc/world ./Desktop/, giving only the parent folder, always ends as Desktop/world. Use this form.

With rsync, the trailing slash on the source decides: rsync -a server:/srv/mc/world/ ./world/ copies the contents of world into ./world, whatever exists. Add -n first to see what it would do without copying anything.

Copying on top of an old world mixes them

Neither scp nor rsync replaces a folder as a whole: files with the same name are overwritten, and files that only exist in the old folder stay. You end up with regions, players and maps from two different worlds. Either move the old folder away first, or use rsync -a --delete, which removes files the source doesn't have. Check the command twice with -n before using --delete.

Paper and Spigot split the dimensions

A single-player world keeps the Nether and the End inside it, in DIM-1 and DIM1. Paper, Spigot and Bukkit servers keep them in separate folders next to the world: world_nether/DIM-1 and world_the_end/DIM1. When you move a world between the two:

  • Download from Paper: copy all three folders, then move world_nether/DIM-1 and world_the_end/DIM1 into world before opening it in single player.
  • Upload to Paper: upload world as it is. Paper moves the Nether and End out on first start (keep a backup in case).
  • Vanilla and Fabric servers use the single-player layout, so nothing moves.

Useful commands

GoalCommand
Download a worldscp -r user@server:/srv/mc/world ./
Upload a worldscp -r ./world user@server:/srv/mc/
SSH on another portscp -P 2222 -r … (capital P) or rsync -e "ssh -p 2222" …
Fast repeat copiesrsync -avz --progress user@server:/srv/mc/world/ ./world/
Skip logs and the editor's historyrsync -av --exclude 'logs/' --exclude '.dat-editor-history/' …
One file instead of thousandstar czf world.tar.gz world, copy that, then tar xzf world.tar.gz

On Windows 10 and 11, scp works in PowerShell as is. WinSCP, FileZilla and Cyberduck do the same with drag and drop: download the whole folder, and on upload choose to replace the folder rather than merge into it when they ask.

After an upload

  • Permissions: if the server runs as its own user, give the files back to it, for example chown -R minecraft:minecraft world. Otherwise it may fail to save, or start a new empty world.
  • Name: the folder must match level-name in server.properties, or the server creates a fresh world next to it.
  • Players lose their inventory? A single-player world stores your inventory in level.dat, and on a server each player has their own file in playerdata. If the server runs in offline mode, UUIDs differ too: see switching online/offline mode.
  • Check before deleting the old copy: open the world, walk to a few places you know, and look at your inventory. To edit files right on the server instead of copying them back and forth, mount it over SFTP.

Ready to edit?Open the file in the editor: every value keeps its NBT type and the file is saved in its original format.