serv restore presents an interactive numbered menu listing every available archive. Selecting an entry stops the server (if running), creates an undo backup of whatever is about to be replaced, performs the restore, and restarts the server.
Running the restore menu
Open the restore menu
backups/, grouped by type, with size and file count for each entry:Enter the number of the backup to restore
Type the number shown in brackets and press Enter. Press Enter with no input to cancel without making any changes.
Confirm the restore
The menu prints a warning and asks for confirmation:Type
y and press Enter to proceed. Any other input cancels the restore.Restore runs automatically
The command handles everything from this point:
- Stops the server if it is running
- Creates an undo backup of what is about to be replaced
- Wipes and cleanly extracts the selected archive
- Removes stale
session.lockfiles - Restarts the server if it was running before the restore
Restore paths
The restore command behaves differently depending on which archive type you select.Daily snapshot restore
A daily snapshot contains world directories pluswhitelist.json and server.properties. The restore process:
- Inspects the archive to determine exactly which world directories and config files it contains.
- Creates an undo backup of only those items — not the entire server directory.
- Wipes the existing world directories before extracting. This is required to prevent stale chunk files and player data from after the snapshot date from surviving the restore.
- Extracts the snapshot into the server directory.
- Removes
session.lockfiles from each restored world directory.
whitelist.json, server.properties) are overwritten in place rather than wiped, since they are single files with no stale-data risk.
Full backup restore
A full backup contains the entire server directory. The restore process:- Creates a full undo backup of the current server directory (same exclusions as
serv backup: nobackups/folder, no build artifacts). - Extracts the full backup archive into the server directory.
- Removes all
session.lockfiles found up to two directory levels deep.
Restore Undo
Restoring the undo archive reverses the most recent restore operation.- Peeks at the top-level entries in the undo archive to identify which directories it covers.
- Removes those directories from the server directory.
- Extracts the undo archive.
- Removes any
session.lockfiles from restored directories.
Server shutdown behavior
Before any restore begins, the server must be fully stopped. If the server does not shut down gracefully within 30 seconds of receiving thestop command, it is force-killed. If the process cannot be stopped even after a force-kill, the restore is aborted to prevent world corruption.
Session lock files
After every restore,session.lock files are deleted from all restored world directories. These files are written by a running server instance to claim ownership of a world. If a session.lock from an archived server instance is left in place, the newly started server will refuse to load the world and log a “world locked” error.