Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

how to make a server auto-save+restart *vanilla*


  • Please log in to reply
80 replies to this topic

#1

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 14 November 2012 - 01:25 AM

I had a problem where my server would either run out of memory, time out, etc. I decided that i'd try to find something to fix this, but to no success. I then made my own thing and here it is.

The cycle goes, open the server and backup up to 1st save, wait 30 min, backup to 2nd save, 30 min, backup to 3rd save, 30 min, backup to 4th save, 30 min, restart and backup to 1st save. So the entire cycle is 2 hours. it also alerts players to whats happening at each event.

The download-- http://www.mediafire...toRestarter.zip

Just put the .bat and .vbs files in the file with your server in it, double click the RUN.bat file and it takes care of itself.

REQUIRED
Make sure the server jar file, yes ONLY a jar file, is named server.jar. to make it a different name, you have to edit the RUN.bat file, go to the line saying java -Xmx1024M -Xms1024M -jar server.jar nogui., and change the name between -jar and nogui
Make the name of your world is just 'world'.


CUSTOMIZING:
Spoiler:

This is for vanilla and forge servers, not web hosted, not bukkit, vanilla and forge.

You may want to redownload this every month or so, because I update it very regularly.

Register or log in to remove.

#2

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 14 November 2012 - 09:50 PM

Ignore this comment

Edited by MineJake516, 02 August 2013 - 02:50 PM.


#3

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 14 December 2012 - 09:34 PM

Since there has been no other comments, I assume there's been no problems, and the code has been successful. If it hasn't, please comment with the problem.

#4

unrivaledneo
  • Location: A galaxy far far away...

Posted 16 January 2013 - 01:50 AM

Testing this out now, using forge and they ave no auto restart program waiting 5 mins to see what happens, ran it once and it oped up the GUI had to remove that . after it and it booted up so here is hoping.

#5

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 05 February 2013 - 12:38 AM

View Postunrivaledneo, on 16 January 2013 - 01:50 AM, said:

Testing this out now, using forge and they ave no auto restart program waiting 5 mins to see what happens, ran it once and it oped up the GUI had to remove that . after it and it booted up so here is hoping.

I hope this went well, since you haven't said the results.

#6

Onfe
    Onfe

    Tree Puncher

  • Members
  • 18 posts
  • Minecraft: onfe

Posted 22 February 2013 - 08:46 PM

Now to find if i can get it to work with tekkit (lite) on a MAC :D

(If i remember :P)
subscribe to my youtube!  www.youtube.com/onfe1

#7

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 22 February 2013 - 09:02 PM

View PostOnfe, on 22 February 2013 - 08:46 PM, said:

Now to find if i can get it to work with tekkit (lite) on a MAC Posted Image

(If i remember Posted Image)
I didn't know there was a tekkit server that's not essentialy bukkit. now i know! hope you do remember. I also have bad memory (mostly for chores)

BTW I'm not sure this would work on MAC, but I've heard that Pc and Mac stuff like this are the same except for console commands, and the script. Like the startup script is different.  I think it's just linux that is really different.
BTW#2 I like your videos, they=funny. I saw you falling every 5 seconds Posted Image

#8

Silarea
    Silarea

    Tree Puncher

  • Members
  • 10 posts

Posted 27 March 2013 - 02:32 PM

Is this a troll post to delete a server and its backup?

Yes. This post deletes your entire server, removes all of your backup files, and kills any files around those folders as well.

#9

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 29 March 2013 - 09:54 PM

View PostSilarea, on 27 March 2013 - 02:32 PM, said:

Is this a troll post to delete a server and its backup?

Yes. This post deletes your entire server, removes all of your backup files, and kills any files around those folders as well.
I was not at all aware that it did that. It didn't do that on my computer. Did you actually use it? Or do you just assume I'm a dirty scammer? This is meant to save the server, not destroy it.

#10

bdubz4552

Posted 12 May 2013 - 03:47 AM

It may destroy the server... If you add in a line to reformat your hard disc...

#11

Mobse
    Mobse

    Tree Puncher

  • Members
  • 17 posts
  • Location: Denmark
  • Minecraft: TheMobse

Posted 11 June 2013 - 09:57 AM

Hey Guys, you can also get a plugin for it. :D
Posted Image
<--- Click me, so the pigs can bee free <3

#12

undefines

Posted 11 June 2013 - 08:56 PM

> Just some suggestions

This would require your computer to always be online for the restart. Also, if you're using a rented host, you probably won't have that type of access. A better solution would be using the "scheduled commands" on a Multicraft/McMyAdmin panel.

In case you are interested in using this method specified by the OP. A program I made a while ago may be of use.


Basically, it allows better waiting within a batch file.
All you need to do is place it inside the same folder as the batch file, and call to it like this:
sleep 20s
sleep 3m
sleep 1.5h
sleep 90
That would wait for 20 seconds.
Then it would wait for 3 minutes.
Then it would wait for 1 and a half hours.
Then it would wait for 90 milliseconds.

Here is the C++ code
Spoiler:

And here is the binary download.

<Download link> <virustotal link>
Hello. My skype is un.define.d

#13

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 22 June 2013 - 10:13 PM

View PostMobse, on 11 June 2013 - 09:57 AM, said:

Hey Guys, you can also get a plugin for it. Posted Image

Well, They point of this is to avoid using plugins, since they are for bukkit servers. As far of the many web searches i've made, there are no mods that do this sort of thing.

View Postundefines, on 11 June 2013 - 08:56 PM, said:

> Just some suggestions

This would require your computer to always be online for the restart. Also, if you're using a rented host, you probably won't have that type of access. A better solution would be using the "scheduled commands" on a Multicraft/McMyAdmin panel.

In case you are interested in using this method specified by the OP. A program I made a while ago may be of use.


Basically, it allows better waiting within a batch file.
All you need to do is place it inside the same folder as the batch file, and call to it like this:
sleep 20s
sleep 3m
sleep 1.5h
sleep 90
That would wait for 20 seconds.
Then it would wait for 3 minutes.
Then it would wait for 1 and a half hours.
Then it would wait for 90 milliseconds.

Here is the C++ code
Spoiler:

And here is the binary download.

<Download link> <virustotal link>

I have no experience with server host websites, since I'd rather have total control of my own server, so I didn't even think about it

I've been trying to revise and improve this, but the frustration of modding minecraft drove me into xbox minecraft, which is so much simpler, but I think I'll come back and try again.

#14

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 02 August 2013 - 03:40 AM

I've revised+improved the thing!

If there are any problems, or it works, please tell me, because my server won't work right now, so I cant test it.

#15

Soultek
    Soultek

    Out of the Water

  • Members
  • 2 posts

Posted 01 September 2013 - 04:05 AM

Hey, just wondering how long does each restart cycle take? Also am I able to edit the values to make the restart more/less often?

#16

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 04 September 2013 - 01:27 AM

View PostSoultek, on 01 September 2013 - 04:05 AM, said:

Hey, just wondering how long does each restart cycle take? Also am I able to edit the values to make the restart more/less often?
The cycle goes, open the server and backup up to 1st save, wait 30 min, backup to 2nd save, 30 min, backup to 3rd save, 30 min, backup to 4th save, 30 min, restart and backup to 1st save. So the entire cycle is 2 hours.
Yes, you can change it. do this by opening both Run.bat and RUN2.bat in notepad (right click, edit). Then find all instances of the line PING -n 1 -w 1800000000 1.1.1.1 >nul. change the 1800000000 to any amount you want, but the time is counted in milliseconds (one minute=60000). This will Change the amount of time between backups and restarts. You can also take out and put in backups, but that's a bit hard.

I just put more customizing info into the top post.

#17

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 03 October 2013 - 09:10 PM

oops, I finally fixed my server, so i can test this, and i made a mistake. All the waiting times were set to 3 zeros too high. My bad ^_^ :lol: ;D

#18

Midnightwoodland

Posted 21 January 2014 - 07:05 AM

hello minejake, i was wondering if your offer to make a custom lave log thing was still open?? i have a server running pixelmon on a kinda crappy computer, would it be posable to make it back up every 30 min and have a reset every 2 hour??   i know that sounds a little nuts but the computer i have the server on only allows the server to have 2 g of ram so things get lagy over a hours time, and i cant be at hole all day resetting it for people all day. ^-^;   Thank you for you time.  -Midnight

Edited by Midnightwoodland, 21 January 2014 - 08:05 AM.


#19

MineJake516
  • Location: Climing in yo windows, Snatchin yo people UP
  • Minecraft: MineJake516
  • Xbox:Epicles0f4wsome

Posted 22 January 2014 - 01:32 AM

View PostMidnightwoodland, on 21 January 2014 - 07:05 AM, said:

hello minejake, i was wondering if your offer to make a custom lave log thing was still open?? i have a server running pixelmon on a kinda crappy computer, would it be posable to make it back up every 30 min and have a reset every 2 hour??   i know that sounds a little nuts but the computer i have the server on only allows the server to have 2 g of ram so things get lagy over a hours time, and i cant be at hole all day resetting it for people all day. ^-^;   Thank you for you time.  -Midnight
Sure,  ill give it to you a.s.a.p. Do you want a special message for when it says it'll restart and save?

#20

Midnightwoodland

Posted 24 January 2014 - 12:46 AM

View PostMineJake516, on 22 January 2014 - 01:32 AM, said:

Sure,  ill give it to you a.s.a.p. Do you want a special message for when it says it'll restart and save?

aaa yes when the server goes to restart i need it to give players a 1 min warning  than the count down like you have all ready
most of my servers are running mods the server this is going on it is a pixelmon server http://pixelmonmod.c...mod.com/blog/   i tryed your current one and it seems to be glitching out after one restart, its opening up mutable server launchers all most like its corrupting some thing and idk whats going on.

    if you would like to see more directly what is going on feel free to add me onto skype matt.moon5 just be shure in the contact request you use the name you have on here so i know how you are lol.