Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

There is no built-in implementation in a Vanilla Minecraft server to force a save every X minutes, then back up the files into a folder. I know how to do log rotations and I can also do a normal backup using Window's XCOPY or ROBOCOPY, but have no idea how to do it when the server is running to prevent possible data corruption.

How can I perform an automatic backup that ensures a consistent state of the game data?

The server is running on Windows.

share|improve this question
1  
I've voted to close this question because it seems to be asking for a software recommendation, which is off-topic. –  Ktash Mar 4 '13 at 5:53
    
@ktash Is there a way for me to reword it in a way so that it is on topic? –  Jeffrey Lin Mar 4 '13 at 20:44
    
This question is being discussed at Arqade Meta: meta.gaming.stackexchange.com/questions/6962/… –  galacticninja Mar 6 '13 at 14:04
    
I'm just confused as to why it was not closed when I first asked it. –  Jeffrey Lin Mar 7 '13 at 1:11
1  
@jeffreylin_ yeah I feel your pain .. some moderators just quickly vote to close without even asking for more information regarding your question ... Oh and also a bombardment of downvotes .. haha .. –  Render Mar 9 '13 at 20:57
add comment

2 Answers

up vote 0 down vote accepted

See here for a list of Server managers, which should help you with more than just backups. http://www.minecraftwiki.net/wiki/Programs_and_editors/Server_wrappers

share|improve this answer
add comment

On Linux, I came up with a rather basic solution which you can find here: https://github.com/pwaller/waitsilence

The idea is to use inotifywait | waitsilence to determine when minecraft has finished writing its backup out. That allows you to avoid corruption.

If you run your minecraft session inside a named screen (e.g, screen -S minecraft), then you can send text into minecraft's input with screen -r -S minecraft -X stuff $'\nsave-all\nsave-off\n'. The -r flag prevents the screen writing save-all, save-off into the screen if it is currently attached.

inotifywait then writes what file modifications are seen, and I wrote waitsilence (above) to wait until nothing has been written for a few seconds.

This can all be put into a backup.sh script which is then run via cron.

share|improve this answer
    
Do you have a version of this for Windows? –  Jeffrey Lin Mar 2 '13 at 21:47
    
I'm afraid not :( –  pwaller Mar 3 '13 at 22:42
    
Darn. I need this for Windows though. –  Jeffrey Lin Mar 3 '13 at 22:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.