This file is a lightweight batch script which will copy your world folder to a given backup directory under a subdirectory of the current day. If the script is called more than once per day, it will update any changed files for that day. This way, you have daily rollback points without taking up a lot of space (like back up every 10 minutes).
You need to edit the script and update two variables, the path to your world directory (WORLD_LOC) and where you want the backups to go (BACKUP_LOC), you can do this by right clicking the file and clicking "edit".
You can use the task scheduler in windows (tons of examples on how to use it online) to run the script as often as you'd like.
Here's the code within the file:
CHANGE THESE VARIABLES TO SUIT YOUR NEEDS
set WORLD_LOC=c:\server\world
set BACKUP_LOC=c:\server\backups
DO NOT EDIT BEYOND THIS LINE
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set TODAY=%%A-%%B-%%C
set BACKUP_LOC_TODAY=%BACKUP_LOC%\%TODAY%
cd "%BACKUP_LOC_TODAY%"
for /F %%A in ('chdir') do set CURRENT_DIR=%%A
if "%BACKUP_LOC_TODAY%" NEQ "%CURRENT_DIR%" (mkdir "%BACKUP_LOC_TODAY%")
xcopy "%WORLD_LOC%" "%BACKUP_LOC%\%TODAY%" /D /E /C /R /H /I /K /Y
This file is a lightweight batch script which will copy your world folder to a given backup directory under a subdirectory of the current day. If the script is called more than once per day, it will update any changed files for that day. This way, you have daily rollback points without taking up a lot of space (like back up every 10 minutes).
You need to edit the script and update two variables, the path to your world directory (WORLD_LOC) and where you want the backups to go (BACKUP_LOC), you can do this by right clicking the file and clicking "edit".
You can use the task scheduler in windows (tons of examples on how to use it online) to run the script as often as you'd like.
Here's the code within the file: