> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/running-a-server/worlds-saves-and-backups.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Worlds, saves and backups

This page tells you where your world lives on disk, how it is saved, how backups work and how to restore one. Read it before you run a server people care about, and certainly before you need a restore.

A server runs one world, named by `server.default_world`. Everything the server persists lives under `storage.data_directory` (default `server-data/`).

```
server-data/
├── worlds/<name>/
│   ├── world.meta            world parameters, environment, companions
│   ├── regions/*.vreg        modified chunks, in region files
│   └── journal/              write-ahead journal
├── backups/<name>/
│   └── <yyyyMMdd'T'HHmmss'Z'>/   one complete backup (UTC time), see below
├── players/<uuid>/
│   ├── profile.dat           identity, position, health, mana, game mode, ...
│   └── inventory.dat         inventory state
├── permissions.json          operators, groups, player entries
├── whitelist.json            whitelist and whether it is on
├── bans.json                 account bans
└── ip-bans.json              address bans
```

`profile.dat` and `inventory.dat` are JSON documents written atomically.

## What is stored

* **Only changed chunks.** A chunk that was never modified is regenerated identically from the seed and the generator version recorded in `world.meta`. Region files hold the others.
* **World parameters.** `world.meta` records the seed, the generator key and version, the structures, the difficulty and the border. These are fixed when the world is created. Changing `world.seed`, `world.generator`, `world.structures` or `world.bonus_chest` in `server.yml` later has no effect on an existing world. Use `/difficulty` and `/worldborder` to change those two at run time.
* **Generator pinning.** A world is never opened with another generator version. A world whose generator is not registered refuses to load, and the error names the generator. There is no fallback.

To start over, stop the server and delete `server-data/worlds/<name>/`. To use another world, change `server.default_world`: the server creates a new world with that name.

## Saving

| What                      | When                                                                                     |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| Modified chunks           | Every `storage.autosave_interval_seconds` (default 60), on `/save-all`, and at shutdown. |
| Player profiles           | On leave, on `/save-all`, and at shutdown.                                               |
| Trades and quest turn-ins | Written to the journal before the player gets the answer.                                |

`/save-all` saves the world and the players now.

Every disk operation runs on a dedicated storage thread. I keep the simulation thread away from the disk on purpose, so a slow drive costs you saves, not ticks.

## Crash safety

* Files are written to a temporary file, flushed, and renamed over the target. A crash leaves the old or the new file.
* With `storage.journal_sync: commit` (default), each journal commit is flushed to disk. Records the world had not saved yet are replayed at the next start.
* A damaged region or chunk is restored from the latest backup that holds a valid copy, and the server logs a warning. Changes saved after that backup are lost. When no backup has a copy, the chunks regenerate.
* A damaged journal segment is reported at start. Changes after the damage are lost.
* If `world.meta` is missing but region files exist, the server refuses to create a new world over them. Restore `world.meta` from a backup.

Keep `journal_sync` at `commit` on a production server. `none` is only there to make development faster.

## Backups

A backup is complete: it holds the world, the players' profiles and the access lists as they were at the same moment. Each one is a directory of `backups/<world>/` named with its UTC time.

```
server-data/backups/overworld/20261204T100000Z/
├── world.meta                    identity, seed, generator, environment (JSON)
├── regions/r.X.Z.vreg            every region file of the world
├── players/<uuid>/profile.dat    position, health, experience, effects, quests, game mode (JSON)
├── players/<uuid>/inventory.dat  inventory (JSON)
└── access/
    ├── whitelist.json            the whitelist and whether it is on
    ├── bans.json                 the account bans
    ├── ip-bans.json              the address bans
    └── permissions.json          operators, groups and permissions (when the server has the file)
```

A backup taken by an older version holds `world.meta` and `regions/` only. `/backup list` shows it as `world only`. Plugin data (`plugins/<name>/`) and the configuration are not in a backup.

### When one is taken

* Every `storage.snapshot_interval_minutes` (default 15). `0` turns the periodic backup off.
* On `/backup now`, from the console or by an operator (`server.command.backup`). The command answers at once and reports the path of the backup when it is done.
* Not at shutdown. The final save at shutdown is not a backup.

Only one backup runs at a time. `/backup now` refuses to start while one is running, and the periodic one skips its turn.

The server keeps the newest `storage.snapshot_retention` backups per world (default 4) and deletes older ones whole.

| Command        | Effect                                                                                       |
| -------------- | -------------------------------------------------------------------------------------------- |
| `/backup now`  | Start a backup. Needs `server.command.backup`.                                               |
| `/backup list` | The backups on disk, newest first, with `world, players, access` or `world only`. Same node. |

### How a backup stays consistent

1. The connected players are saved, as the autosave does.
2. The world is saved: the modified chunks and `world.meta`, with the journal rotated.
3. Once both are on disk, the profile files are linked from the player storage thread, after every profile write that was already queued and before any later one. The two files of a player come from the same save.
4. The access lists are written from memory, so they are exactly what the server enforces.
5. The directory appears with one rename. A backup that is being built is named `<time>.partial`. It is never listed, used or kept, and a crash leaves a `.partial` directory that the next backup removes.

Region and profile files are hard-linked into the backup when the file system allows it, and copied otherwise. They are only ever replaced by a rename, never modified in place, so a backup costs almost no space until the live files change. Because a backup file may be the same file as the live one, never edit a file inside a backup. Copy out of it.

The recovery at start-up reads these backups too: a damaged region or chunk is restored from the newest backup that holds a valid copy (see [Crash safety](#crash-safety)).

## Backing up a server

Back up `server-data/` and your `config/` folder. A backup directory is complete by itself and can be copied while the server runs, any time after it appears (not a `.partial` one). To copy it to another machine use a tool that stores hard-linked files as ordinary files: `rsync -a --copy-links`, `tar` or `robocopy`. Plugin data is not in a backup: copy `plugins/` with your own tooling.

## Restoring

Restore with the server stopped. Replace `overworld` and the time with yours. Paths are relative to `server-data/`.

1. **Stop the server** (`/stop`) and wait for it to exit.
2. **Keep what is there.** Move the current data aside instead of deleting it:

   ```sh
   mkdir restore-undo
   mv worlds/overworld restore-undo/world
   mv players restore-undo/players
   mkdir restore-undo/access
   mv whitelist.json bans.json ip-bans.json permissions.json restore-undo/access/   # the ones that exist
   ```
3. **Pick the backup.** `ls backups/overworld`, or `/backup list` before you stop. Call it `B=backups/overworld/20261204T100000Z`.
4. **Restore the world.** Copy, do not move or link, so the backup stays intact:

   ```sh
   mkdir -p worlds/overworld/regions
   cp $B/world.meta worlds/overworld/world.meta
   cp $B/regions/*.vreg worlds/overworld/regions/
   ```

   Do not restore `worlds/overworld/journal/`. It holds block changes made after the backup, and the server would replay them over the restored world. Leave the directory absent.
5. **Restore the players.** Skip this step to keep today's players in the older world:

   ```sh
   cp -r $B/players players
   ```

   Players who joined after the backup have no profile and start as new players.
6. **Restore the access lists.** Skip it to keep today's bans and whitelist:

   ```sh
   cp $B/access/whitelist.json $B/access/bans.json $B/access/ip-bans.json .
   cp $B/access/permissions.json .      # operators and groups
   ```
7. **Start the server.** It verifies `world.meta` and every region, and logs anything it could not use. Join once to check the spawn, your inventory and `/banlist`.
8. When you are satisfied, delete `restore-undo/`. Otherwise stop the server and put the saved directories back.

On Windows use `copy`, `xcopy /e` and `move` in a Command Prompt, or Explorer, with the same sources and targets.

**One player.** With the server stopped, or the player offline, copy `players/<uuid>/` from the backup over the live `players/<uuid>/`, both files together. The directory is named with the player's UUID, and `profile.dat` holds their last `username`. In offline mode the UUID is the part after `offline:` of the player id.

**Part of the world.** With the server stopped, copy only the region files you need (`r.X.Z.vreg`, 32 by 32 chunk columns each, `X` and `Z` being the region coordinates) into `worlds/overworld/regions/`. Keep the other regions and `world.meta`. A region is restored as a whole: its chunks go back to the backup's state.

## Players

`players/<uuid>/` is created when a player first joins. In online mode the folder name is the account's id. In offline mode it is derived from the name (`offline:<uuid>`), so the same name always gets the same profile.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/running-a-server/worlds-saves-and-backups.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
