[Broken][TOOL]Craftsave v0.9.4 - Auto World Backups with save-off/on/all [ALL]

Discussion in 'Bukkit Tools' started by malface, Feb 12, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    malface

    Craftsave - Automatic World Backups (for Windows)
    Version: v0.9.4

    ****************************Notice****************************
    Craftsave no longer works with the new save format. The server does not stop using the new save files, even after a save-off is sent. This prevents any program from accessing the save while the server is running. If this changes, I may update Craftsave again.
    Thank you everyone who used Craftsave! Your input and testing and support was inspiring!
    Thanks to all of the great feedback, I've begun teaching myself some Python and specifically game dev. Good luck, and I'll see you around the boards.
    Here's a screenshot from a few days ago, me learning 3D in Python:
    [​IMG]

    ******************************************************************



    Welcome to Craftsave, your set it and forget it solution to Minecraft backups!
    Craftsave is intended for use on Microsoft Windows.

    Craftsave runs in the system tray and keeps your world folders backed up.
    It also sends save-off and save-on to the server to prevent the server from saving during backups. This is not a server wrapper or plugin, it uses a script to find the server window and send to it.

    Updating:
    When updating Craftsave from a previous version, it is best to rename your old Craftsave.ini to Craftsave.txt and let the program create a new one. Then change the settings in the new Craftsave.ini to reflect what you wrote for your previous file.


    Installation:
    • Craftsave should be placed in a directory called Craftsave, located in the same directory as your world folders.
    Example:​
    Craftsave\​
    World\​
    Nether\​
    minecraft_server.jar​
    • The first run of Craftsave will create an example config file called Craftsave.ini, adjust these settings prior to running Craftsave again.
    • For 64 bit installations, please use the included CraftsaveX64.exe, and rename it to Craftsave.exe prior to running.
    • Start Craftsave after your server is running.
    Features:
    • Automatically sends save-off and save-on commands to the server.
    • Optionally broadcast a message to the server while save is in progress.
    • Easily adjust settings such as save file prefix, which worlds to backup, save location, minutes between saves, and number of days to keep backups before they are removed.
    • Craftsave runs in the system tray, giving quick access to temporarily toggle autosaves off/on.
    • Roll your mouse over the icon to see when the last save occurred.
    • Automatically sends save-all to the server. Note: Save-all has a buffer time of 2 minutes added in Craftsave (to protect save files).
    • Hide/Show Minecraft Server window from the tray menu
    Download Craftsave v0.9.4
    Test Build v0.9.4.1 (Crafty support)

    Known Issues:
    • Craftsave shows separate progress bars for each world, which can sometimes lead you to believe the save is complete while it is not. Please give saves time to complete before attempting to open them.
    • Craftsave's built in defense against quitting the program during saves will not let you quit if there are errors while saving. Be sure your World names are correct in the .ini and your installation directory is correct.
    Changelog:
    Version 0.9.4
    • Added auto send save-all command to the server
    • Added option to hide minecraft server window
    • Added "Force Exit" option to the tray menu
    • Added a feature that disables most tray menu items during saves
    • Fixed a bug where deleting a file would sometimes cause Craftsave to freeze
    • Fixed toggle for Autosaves - it should actually work now
    • Changed the way saves are timed to be able to include the save-all command
    • Added checks for both save and save-all so one does not happen while the other one is running
    Version 0.9.3
    • Now does even more to try and find your server window if not found
    • Stopped some continuous loops on error
    Version 0.9.2
    • Added better error handling for when Craftsave can't find your server window
    • Added better error handling for when Craftsave can't find your World folders
    • Extended functionality of the tooltip on the tray icon to tell you when Craftsave is saving
    • Updated the readme.txt with much more information on settings
    Version 0.9.1
    • Fixed capitalization in broadcasts
    • Fixed a memory leak which could occur while deleting old backups
    • Added some cpu saving features that should help a little with cpu load
    • Cleaned up the code a bit
    • Included Source with download
    Version 0.9
    • Release to public
    Note: This is (basically) my first attempt at programming anything, let alone something this complete. Two days ago I decided to teach myself AutoIT, and this is the result. Thank you for your patience with my first attempt at programming/scripting.


    Here's a video tutorial made by chernobyl360. I would like to add that Craftsave only has to do the window finder in this video with certain setups. Your setup may just work without it.


    Chernobyl360 was nice enough to make a new tutorial. I'll keep both here as there are rare cases where the above setup is still needed.


    Check your Craftsave.ini file. There is a setting for the name of your server window. It should match as close as possible to the titlebar of your server console window. My server is running in a cmd window titled C:\Windows\system32\cmd.exe

    The code is actually supposed to do a search, so in my case, just cmd.exe is supposed to work, but I found I had to match it more exactly to get it to find it.

    Ah thanks, what version windows are you using? I'm looking into this now.

    Also, could you show me what you have set in the craftsave.ini?

    I'm running win7 ultimate x86, it may be a stray character in your ini. I may have to install x64 to debug this.

    Fixed with Version 0.9.2 Big Thank You to chernobyl360 for their testing, and patience!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  2. Offline

    chernobyl360

  3. Offline

    malface

    Version 0.9.3 uploaded, MUCH more stable. Let me know if there are anymore issues.
     
  4. Offline

    chernobyl360

  5. Offline

    Daveyo

    what do you do with the save files. are they just the world folder zipped up?
     
  6. Offline

    malface

    Yeah, it's just a .zip of each of your world folders. Useful if you have ever logged into your world to see massive square mountains shooting up through your creations.
     
  7. Offline

    h0us3cat

    Is it hard to make save-all and backup time seperate?
    I want to save-all every 30 minutes and backup every 4 hours.
    Because backupping a 500MB world every 30 minutes is not a good idea :)
    And does it realy sends a save-all command? Because i dont see it in the console.
     
  8. Offline

    Daveyo

    I dont think the save-all function has anything to do with this. It just zips up the current start of your world and puts it somewhere. For save-all there is different software
    --- merged: Feb 15, 2011 3:56 PM ---
    This is very nice software indeed. Good work.
     
  9. Offline

    h0us3cat

    Any plans on adding a save-all command?
     
  10. Offline

    chernobyl360

    yes there will be an update. not for a while. Malface and i have been debugging this for the past few days. Currently it will stay at 0.9.3 for a while. we *mostly malface* wants to let people get a taste of this and see what everyone thinks. At the moment hes trying to learn Python, so who knows he may make something different.
    --- merged: Feb 15, 2011 9:04 PM ---
    Well heres an idea.. if you have such a huge world try and make the backup Very Early in the morning and very late at night. For your Save-all command try this *http://forums.bukkit.org/threads/admn-autosave-v0-0-3-automatic-world-saves-323.4316/#post-59259*

    You run this server sided, so be-careful of lag, but you should already know this since you commented and obviously used it...But what are your pc specs? cause if you have a 500mb world and run a server you shouldn't have a issue backing up. since this is pc side only not server sided like *backup 0.85* it wont exactly *from what i know* interfere with your internet connection....
     
  11. Offline

    h0us3cat

    Yeah i installed that plugin last night, need to wait if my server is emty to restart :)
    Server specs are i7 930 with 8gb ddr3 ram and a ramdisk of 2gb. server is assigned with 4gb of ram and a 100Mbit connection
     
  12. Offline

    chernobyl360

    very nice, i like the setup :D. Yea you wouldnt have all that much of an issue with backing up and the save-all.Another idea is when your world does a save-all or auto backup try and warn your players. make sure they are spread out in a vast area. having them clumped up while backing up would most likely crash the server.Do you by any chance use a server wrapper? I recommend MilkAdmin :D. So you can warn your players of a backup/save-all.
     
  13. Offline

    malface

    I am looking into adding the save-all command. The problem is I want this to always make stable backups. So I would need Craftsave to know when a save-all command has completed. This is difficult to do and still keep Craftsave completely separate from the server. Also I want to keep Craftsave small, and not have it read every line from the console or something like that to know when a save-all is done.

    Also yeah, 500mb world backups must be a pain! But Craftsave lets you adjust how often you backup. You could have it run one backup per day, with 1440 in the settings file for minutes between backups. And then have Craftsave delete old backups after something like 5 days old. Then just leave it running in the background and you'll have 5 days of backup to combat griefers or errors. I toyed around with the idea of incremental backups but it's not what I'm looking for with this program. The idea is to have separate full backups to fall on when emergencies arise. And with 5 days of backups (or more) you'll be ok even if you don't get a chance to log in for a day or two.
    --- merged: Feb 15, 2011 11:04 PM ---
    Yeah this doesn't touch anything besides writing to the console window effectively "mimicking" a keyboard. And Craftsave will not run unless it can find that window. This is by design, so there are no chances of having half-done backups, or if your server has crashed...you wouldn't really want to save the crashed state of the world.
    --- merged: Feb 16, 2011 5:38 AM ---
    Just about done with the next update, should be done tomorrow sometime. Seems like it's all working now, just have to let it run a bit before I release it. This next update includes some fixes: program freezing after deleting a backup, and did some better code on the save timers. It also includes Auto/Force save-all command to server, and an option to completely hide/show the console window for the server and still run commands.
     
  14. Offline

    Daveyo

    Ok, took a few days to get this working properly. Had to be very clear on the settings.

    If it is working properly it should compress your world file and back it up on startup



    my config file changes

    [Settings]
    Window Name=Minecraft Server - Protected By Craftsave
    Prefix=Craftsave_
    Worlds=world <-------------- took out nether, had to make world lower case
    Backup Folder=H:\Bukkit 323\world\backup <----- this doesnt seem to care what you type
    Broadcast=Yes
    Save Time=20
    Days To Keep Backups=1
    Path To World Folder=H:\Bukkit 323\ <----- had to take out world so it's just the base directory

    also had to put this(the whole craftsave folder) in the base bukkit directory NOT the bukkit/world directory.
    Then had to replace the 64bit exe with the regular craftsave.

    Pretty tough but manage to get it working
    --- merged: Feb 16, 2011 5:36 PM ---
    backup folder seems to take off the last folder typed. So C:\backup is saving to my C:\ base drive
    --- merged: Feb 16, 2011 5:41 PM ---
    Awesome job, 1 suggestion: Please make an option to backup the whole bukkit folder so we can save all our plugin config files automatically.
    --- merged: Feb 16, 2011 5:43 PM ---
    also, not broadcasting to the server. Using crafty v0.6
    --- merged: Feb 16, 2011 5:46 PM ---
    last thing, what happens if the world is being edited during the saves. Does it take the state of the world at the beginning of the save? Or is there going to be some chunks with conflicts in them?
     
  15. Offline

    chernobyl360

    #1 Yes Craftsave is some what difficult. im thinking about asking my friend malface here if he can post my x64 config setting on the forum.

    #2with the suggestion, he is gonna make a few new features maybe this will be one.

    #3 with the broadcasting issue, from what i know of, wrappers shouldnt effect craftsave. But thats a GUI. so it may actaully to something. try using a webadmin. i recommend milkadmin.

    #4 it saves no matter what. so what ever was the last block placed is what will be featured in that save.
     
  16. Offline

    malface

    There are detailed instructions in the readme file, the top line should have whatever words are on the toolbar of the program you type your console commands into. The program generates a default config file...so Worlds= would be the list of worlds you have, since bukkit supports multiple worlds now. I will look into the backup folder issue. If Craftsave is not finding your window, to send the commands save-off and save-on to the server, then I don't recommend using it. Still, Craftsave is capable of sending commands to a variety of windows, as I have sent commands to notepad and firefox during testing. The key is having your Window= setting set to exactly the words that are on the top of your server window. After this next update, I will install crafty and see if I can get it to work.

    Craftsave backs up your worlds at a set interval, not just at startup.
     
  17. Offline

    LittleNiamh

    Hi, I'm proberly doing something daft,

    I'm getting the following error :

    my config is :

    Code:
    [Settings]
    Window Name=C:\Windows\system32\cmd.exe
    Prefix=Craftsave_
    Worlds=world
    Backup Folder=C:\Program Files\Minecraft\Craftsave\
    Broadcast=Yes
    Save Time=60
    Days To Keep Backups=2
    Path To World Folder=C:\Program Files\Minecraft\
    I tried leaving the path to world empty but it had the same error.

    Tring to run this in Windows server 2003 R2 32bit.

    Thanks in advance

    Little Niamh
     
  18. Offline

    chernobyl360

    ok.

    ill just run through the whole thing so i know im explaing it correctly :D

    1:download
    2:extract to desktop
    3:get craftsave.exe not 64 bit
    4:find your server folder
    5: create a craftsave folder within your server folder
    6:copy craftsave.exe to the craftsave folder
    7:Start your server
    8:Start craftsave *error should show*
    9:Restart Craftsave
    10:It should do an automatic backup once it first runs.

    if this doesnt work it maybe you operating system or. who knows, maybe with this new hotfix then maybe its conflicting some where :/
    --- merged: Feb 17, 2011 12:12 AM ---
    Code:
    [Settings]
    Window=CabinetWClass
    Prefix=Craftsave_
    Worlds=World
    Backup Folder=C:\Users\William\Desktop\Server\Backups
    Broadcast=Yes
    Save Time=60
    Days To Keep Backups=30
    Path To World Folder=
    Window Name=Minecraft Server - Protected By Craftsave
    this what it looks like on mine
     
  19. Offline

    malface

    This is all true, except one key piece of information I think I left out that is confusing everyone. The Craftsave.ini file that is generated is not a setup file, it is an example. It MUST be edited first, before it will work on any system that is not setup close to the way mine is. The settings that will cause errors will be Window=, Worlds= , and Path To World Folder.

    If you want the easiest setup on a vanilla server:

    1. Copy Craftsave.exe to a folder named Craftsave in the minecraft server's main directory.
    2. Start your minecraft server.
    3. Run Craftsave once, open the ini file it created, type in the exact words shown on the title bar of your running server as the Window setting.
    4. Worlds=World
    5. Restart Craftsave.

    A lot of the errors are coming from Craftsave not finding your server window. The best way for this to work, is for you to type everything exactly as it appears in your title bar. For example, my Firefox titlebar right now says:
    [TOOL]Craftsave v0.9.3 - Auto World Backups with save-off/on [ALL] | Bukkit Forums - Mozilla Firefox
    All of that would be needed, if my minecraft server was running in this window right now. So:
    Window=[TOOL]Craftsave v0.9.3 - Auto World Backups with save-off/on [ALL] | Bukkit Forums - Mozilla Firefox

    That said, I'm working on the next release a bit more, trying to squash any extra bugs I may run across.
     
  20. Offline

    LittleNiamh

    Hi again, I've double checked my config and I believe it right

    I'm running the server with nogui so its running in a CMD window and the title of the window is the same.
    C:\Program Files\Minecraft\Craftsave - is where all the craftsave files are.
    C:\Program Files\Minecraft - is where my minecraft and craftbukkit jars are as well as world and nether folders.

    If you can think of other things to try I'm happy to try them.
     
  21. Offline

    malface

    Ok, from the ini file you posted above, try a blank setting for Path To World Folder and if you just have a world folder, use Worlds=World if you have a world folder and a nether folder use Worlds=World,Nether Note the capitalization.
    Also check the capitalization in your Window Name setting.
    Just thought of this too, since you're running it from the Program Files folder, you might have to run Craftsave as Administrator (Right Click, Run as administrator) since Craftsave will need permission to create and delete files within that folder.
    --- merged: Feb 18, 2011 4:06 AM ---
    Updated today, also uploaded a test build with Crafty (an awesome server gui) support. Link is below the regular download link in OP. Window Hide/Unhide works with Crafty, but does not send the commands to it while hidden.
     
  22. Offline

    Waffletastic

    So do we have to start it everytime we restart our servers?
     
  23. Offline

    chernobyl360

    Yes.
     
  24. Offline

    malface

    You could also add a line to run.bat to start it.
    Above the PAUSE line add: ping -n 60 127.0.0.1 > NUL
    This makes the .bat file wait 60 seconds before running the next program.
    Then: C:\***craftsavelocation***\craftsave.exe
    Of course change ***craftsavelocation*** to the location of craftsave.
    You can change the 60 in the ping line to any number of seconds you need to wait before starting Craftsave.
    Just make sure PAUSE is the last line in run.bat
     
  25. Offline

    chernobyl360

    wow very nice :D. i gotta try this
     
  26. Offline

    pizclassy

    Hello, i watched the tutorial on how to set this up and it is working fine except for one small thing. It shows the world being compressed, saved, and i can open it when i need to. HOWEVER, the green craftsave icon in my bottom right toolbar says there is a save in progress and so does the CMD even after everything is done saving. I have no clue how to fix this, please help, thank you
     
  27. Offline

    malface

    Sometimes this can actually be caused by Windows. Craftsave uses the built in zip capabilities of Windows to zip your worlds, so if that zip hangs it can cause Craftsave to also get stuck on saving.
    What is your version of Windows, version of Craftsave, and can you copy/paste the settings from your Craftsave.ini?
    Also, there was an error from an early version of Craftsave that caused this kind of freezing on saves, so if you aren't using the latest version this could be it as well.
     
  28. Offline

    Daveyo

    what in gods name are you saying
     
  29. Offline

    malface

    LOL I'm saying you can run your server normally, and the same file that runs the server waits, then runs craftsave too. For people who like to conserve clicks.

    Get 50% more lifetime out of your left mouse button by using this method!
     
  30. Offline

    pizclassy

    i fixed it, just happens to be really slow with saving
     
Thread Status:
Not open for further replies.

Share This Page