Hey! So, running a vanilla server, auto-backups aren't exactly easy to do inside minecraft itself. You need a 3rd party backup to do it for you. Well, with a simple .bat file, you too can create your very own auto backup scheduler! I'll post my code, and feel free to use it, or edit it as you see fit, as it's only a batch file. Copy paste it into notepad, edit to your setup, save as a .bat file, then run!
@echo off
@title Backup Scheduler
cls
set TIMESTAMP=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%-%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
set BACKUPS=0
GOTO BACKUP
:START
echo ------------------------------------------------------
echo Server Backup Scheduler
echo ------------------------------------------------------
echo Backups performed: %BACKUPS%
echo Last Backup: %Timestamp%
TIMEOUT /T 10800 /NOBREAK
echo.
:BACKUP
echo Exectuting Backup..
echo -----------------------------
set TIMESTAMP=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%-%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
echo Backing up to folder: %TIMESTAMP%
echo.
echo.
10800:
This is how often, in second, your batch file will execute the backup.
(3600 seconds per hour, so this is three hours)
%appdata%\minecraft\backup:
This is the directory where the backup folders will be created/copied to. Can be a normal directory, like "C:\Program Files\Java" BOTH MUST BE THE SAME!
%appdata%\minecraft\saves\World:
This is the directory where your World folder is located. (The folder that contains the level.dat)
And that's it! Can be saved anywhere, run it and leave it open. It'll keep making copied until you tell it to stop.
WARNING: AS THIS IS AN AUTO BACKUP, IT WILL MAKE A COPY OF YOUR ENTIRE WORLD AT THE INTERVAL YOU SPECIFY. THIS CAN BE SPACE INTENSIVE, EVEN AT 3 HOUR INTERVALS CAN USE UP TO 20GB OF SPACE A DAY! MAKE SURE YOU HAVE PLENTY OF HARDDRIVE SPACE!
Mandatory disclaimer: Not responsible for any damage this could cause to your system. People not knowing what they are doing, or adding in a delete system 32 because someone told them it was cool is not my fault. The code is right there, if you have doubts on what it does, look it up. The internet is a wealth of information.
"Humor. Two unconnected things are suddenly united by a paradigm shift. It is hard to describe, but we all know it when it happens. Weirdly, it causes us to make a barking noise."
---- Jesse Schell, The Art of Game Design: A Book of Lenses
10800:
This is how often, in second, your batch file will execute the backup.
(3600 seconds per hour, so this is three hours)
%appdata%\minecraft\backup:
This is the directory where the backup folders will be created/copied to. Can be a normal directory, like "C:\Program Files\Java" BOTH MUST BE THE SAME!
%appdata%\minecraft\saves\World:
This is the directory where your World folder is located. (The folder that contains the level.dat)
And that's it! Can be saved anywhere, run it and leave it open. It'll keep making copied until you tell it to stop.
WARNING:
AS THIS IS AN AUTO BACKUP, IT WILL MAKE A COPY OF YOUR ENTIRE WORLD AT THE INTERVAL YOU SPECIFY. THIS CAN BE SPACE INTENSIVE, EVEN AT 3 HOUR INTERVALS CAN USE UP TO 20GB OF SPACE A DAY! MAKE SURE YOU HAVE PLENTY OF HARDDRIVE SPACE!
Mandatory disclaimer: Not responsible for any damage this could cause to your system. People not knowing what they are doing, or adding in a delete system 32 because someone told them it was cool is not my fault. The code is right there, if you have doubts on what it does, look it up. The internet is a wealth of information.
mate, you are a lifesaver, it´s the best i can found in all the internet forum, thank you so much my friend :DDD
PD: yep, i just create my account just to comment in this publication hahahahahah
Thanks so much! I'll be using this for sure.
"Humor. Two unconnected things are suddenly united by a paradigm
shift. It is hard to describe, but we all know it when it happens.
Weirdly, it causes us to make a barking noise."
---- Jesse Schell, The Art of Game Design: A Book of Lenses