How to Create a Backup Script for your Minecraft Map (Manual and Fast)
If you run a Minecraft server on your own computer to play with friends, you know that weeks of progress can be lost in seconds due to a crash, a power outage, or a world save error. Making manual copies of the "world" folder all the time is annoying and you eventually forget.
The most practical solution for those who want security without complications is to create a small .bat file. With just two clicks, it compresses your map into a ZIP file with date and time, organizing everything in a separate folder.
Why use a script instead of "Copy and Paste"?
- Organization: The script puts the date and time in the filename (e.g.,
Backup_World_2026-02-06.zip), so you never confuse versions. - Space: By compressing to ZIP, the backup takes up much less space on your HD or SSD than an open folder.
- Practicality: You don't need to navigate through folders. The backup button is right there, next to the file that starts the server.
The Script Code
This script was designed to be placed inside the main folder of your Minecraft server (where server.jar is located). It will read the world folder and create a folder named backups to store the files.
@echo off
:: Your world folder name
set FOLDER_TO_BACKUP=world
set BACKUP_DEST=backups
:: Create the destination folder if it doesn't exist
if not exist "%BACKUP_DEST%" mkdir "%BACKUP_DEST%"
:: Get date and time via PowerShell to avoid Windows format errors
for /f "tokens=*" %%i in ('powershell -NoProfile -Command "Get-Date -Format 'yyyy-MM-dd_HH-mm-ss'"') do set TIMESTAMP=%%i
echo [BOREAZ] Starting backup of folder: %FOLDER_TO_BACKUP%...
:: Command to generate the ZIP
powershell -NoProfile -Command "Compress-Archive -Path '%FOLDER_TO_BACKUP%' -DestinationPath '%BACKUP_DEST%\Backup_World_%TIMESTAMP%.zip' -Force"
echo.
echo ===========================================
echo Backup completed: %BACKUP_DEST%\Backup_World_%TIMESTAMP%.zip
echo ===========================================
pause
How to configure on your PC
- Open Notepad.
- Copy the code above and paste it there.
- Go to File > Save As.
- In the Save as type field, change it to "All files".
- Name it
make_backup.batand save it in the server folder.
How to use
Whenever you finish playing and close the server console, just double-click the make_backup.bat file. A black window will appear showing the progress and, at the end, your map will be safely saved and compressed.
Remember that the server must be closed; to shut down the server correctly, type stop in the server window and wait for it to close.
Security tip: From time to time, copy your backups folder to a flash drive or the cloud (Google Drive/OneDrive). This way, even if your PC has a physical problem, your builds will be safe!