Skip to main content

/save-all

Forces the server to save all chunks and player data to disk. The flush option ensures data is written synchronously.

Category
Server
Permission Level
Owner / Console
Version Added
1.0

Overview

Forces the server to save all chunks and player data to disk. The flush option ensures data is written synchronously. In vanilla Minecraft Java Edition it is one of the server commands and has been available since version 1.0.

It is invoked as /save-all [flush] and accepts one optional argument ([flush]).

Automatic saves already happen periodically. Use /save-all before backing up the server to ensure data consistency.

Without 'flush' the save is asynchronous. Adding 'flush' forces a synchronous write, which guarantees a consistent backup but can cause a brief lag spike on a busy server.

Syntax & Arguments

/save-all [flush]

The full syntax is /save-all [flush]. Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. Every argument is optional, so the bare command is valid on its own. The argument [flush] may be omitted, in which case the documented default applies.

flush
Optional, of type a literal. If specified, forces all data to be written to disk synchronously before returning.

Parameters

NameTypeRequiredDescription
flushliteralOptionalIf specified, forces all data to be written to disk synchronously before returning.

Examples

The 2 examples below are ready to copy and adapt. For instance, /save-all saves all world data to disk asynchronously. Each example varies the arguments to show a different real use of /save-all; read the note under every snippet to see exactly what changes.

/save-all

Saves all world data to disk asynchronously.

/save-all flush

Saves all data and waits for the write to complete before continuing.

Permission Level & Requirements

/save-all sits at permission Level 4 - Owner / Console, which means it needs permission level 4 (owner or server console).

Requires level 4.

This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.

Common Mistakes

Notes

Automatic saves already happen periodically. Use /save-all before backing up the server to ensure data consistency.

Related Commands

If /save-all is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /stop and /reload. They cover closely related tasks, so the links above jump straight to each one.

Frequently Asked Questions about /save-all

What does the /save-all command do in Minecraft?

Forces the server to save all chunks and player data to disk. The flush option ensures data is written synchronously. It belongs to the server command group and was added in Java Edition 1.0.

What is the correct syntax for /save-all?

/save-all [flush]. The required arguments are none, and the optional one is flush.

What permission level does /save-all need?

It requires permission Level 4 - Owner / Console. On a server the player must be an operator at that level, or have cheats enabled in single-player.

What is a common mistake when using /save-all?

Using /save-all flush too frequently on a live server, synchronous writes can cause lag spikes.

Can you give an example of /save-all in use?

Yes. /save-all flush — saves all data and waits for the write to complete before continuing.

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting