[INACTIVE][ADMN] BackupPlugin v0.8.5 (Backups & Maps)

Discussion in 'Inactive/Unsupported Plugins' started by MysticX, Jan 17, 2011.

  1. Offline

    MysticX

    I finally managed to port my BackupPlugin to Bukkit.
    You can find the original thread at Hey0's forum

    There are some changes and issues with porting to Bukkit:
    Console commands won't work at all, also the plugin does not force a world save nor disables saving for the progress of backuping! This will be fixed when it's possible to access console commands with Bukkit.
    Also there are some new config options. As there is currently no user rights management, you need to specify all authorized users in the config. Also you now need to set your world name in there.

    All other parts of the plugin haven't changed (especially automatic backups and ingame commands are working), so expect the same bugs/issues! Feel free to modify my work if you want and can, because I can't actively develop for some weeks, so don't expect big updates from me. But I know there are other talented plugin developers out there :)


    BackupPlugin v0.8.5

    This plugin allows you to create world backups or to generate world maps automatically or via ingame command.

    Commands
    • /backup <force> (optional) - backups your world data
    • /map <force> (optional) - generates map(s) of your world
    • /breload - reloads BackupPlugin configuration file
    • /loglevel <level> - sets log level
    Valid arguments for force are true & false. Using a command with true will result in a forced cache rebuilt, useful if you want to avoid the cache-lifetime for any reason.
    Valid arguments for log level are FINEST, FINE, INFO, WARNING or SEVERE (case sensitive!), default is INFO. FINE & FINEST will generate debug output.
    Valid arguments for time unit are SECONDS, MINUTES, HOURS, DAYS (case sensitive!), default is MINUTES.


    Properties

    This plugin will generate a properties file in your server home (BackupPlugin.properties)
    Here are two examples:

    Standard properties file (for mcmap): here
    My properties file (for c10t): here


    Version History
    • v0.8.5
    • v0.8.4
      • fixed issues with user rights
    • v0.8.3
      • ported to Bukkit
      • added config option for world name
      • added config option authorized-users, separate names with semicolon
      • changed first-run pattern to HHmm (removed the colon!)
      • auto-save while doing backups won't work for now
      • console commands also won't work
    • full version history
    Future Updates
    Known Issues / Bugs
    • spaces in folder structure will lead to fail of mapping!
    • windows paths only work if double backslash is used (for example C:\\temp\\world-maps\\ )
    • 0 byte zips sometimes
    • fail of backup because of tmp_chunk.dat (will be fixed in a future bukkit version)
    If you find something that's not working, please set loglevel to FINEST and paste your server logs along with the BackupPlugin.properties here in this thread, or send it to me via pm. Also it would help to know your OS and java version. I'll probably look into it then!


    License

    [​IMG]
    BackupPlugin by MysticX is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

    Source codes are included in the jar file.


    Download

    As usual: This plugin is still beta and could behave unexpected or corrupt your world backups. So please do a manual backup of your world before using it!

    Plugin
    Recommended mapping tools
     
  2. Offline

    _Oni_

    New release : 0.8.6
    This version works on Craftbukkit #440 and #457
    This version works with Permissions 2.0 (and probably more recent version of Permission) and GroupManager 0.99c.
    Donwload : https://github.com/downloads/OniTux/BackupPlugin/BackupPlugin.jar
    Changelog :
    • Force a save-all when a backup or a map generation was started (need to be tested) Oups, It's not ok for this, sorry, I will "fix" it on next release :p
    • Commands can use in console now
    • Shorter messages in console log
    • Much cleaning code
    For the 0 byte zip file bug, I can't reproduce since Minecraft beta 1.3, I need some return (like error log) if you have this problem again.
     
    ssechaud likes this.
  3. Offline

    KCMO_HITMAN

    plz help. backup works fine but the mapping fails. im using mcmap with config

    #BackupPlugin Config File
    #Sun Feb 27 18:12:59 CST 2011
    debug=false
    level-name=world
    automap-period=30
    time-unit=MINUTES
    mapper-executable=C:\\Users\\jayme\\Desktop\\mcmap\\mcmap.exe
    backup-history=5
    authorized-users=Mystic_X;KCMO_HITMAN
    use-latest=false
    temp-path=world-backups/temp
    log-level=INFO
    map-path=world-maps
    map-options=-png -file $o $w
    backup-path=world-backups
    first-run=1200
    autobackup-period=15
    cache-lifetime=30

    this is the log although i should probably change to finest before posting but maybe someone can help without

    2011-02-27 19:15:58 [INFO] [BackupPlugin] KCMO_HITMAN triggered world mapping.
    force = true
    2011-02-27 19:15:58 [INFO] [BackupPlugin] Starting map generation process.. thi
    s could take a while!
    2011-02-27 19:15:59 [INFO] [BackupPlugin] Rebuilding Cache. This can take sever
    al minutes, depending on the world size.
    2011-02-27 19:15:59 [INFO] [BackupPlugin] Deleting cache, might be obsolete.
    2011-02-27 19:15:59 [INFO] CONSOLE: Enabling level saving..
    2011-02-27 19:15:59 [INFO] CONSOLE: Forcing save..
    2011-02-27 19:15:59 [INFO] CONSOLE: Save complete.
    2011-02-27 19:15:59 [INFO] CONSOLE: Disabling level saving..
    2011-02-27 19:15:59 [INFO] [BackupPlugin] Mapping pass 1 of 1...
    2011-02-27 19:15:59 [WARNING] [BackupPlugin] Mapping failed, something went wro
    ng while executing external code! Exit Status: 1
    2011-02-27 19:15:59 [INFO] [BackupPlugin] Mapping process finished.
    2011-02-27 19:15:59 [INFO] CONSOLE: Enabling level saving..
     
  4. Offline

    John Barney

    I recommend making a new thread for your fork of this project. I also appreciate your work getting this up to date. Looking forward to multiworld support.
     
    Oscarius likes this.
  5. Offline

    ursa_arcadius

    Is this going to be updated? I have not found a different plugin for bukkit that works as well.
     
  6. Offline

    umarth

    see the last post of _Oni_ this is funcional
     
  7. Offline

    ssechaud

    Using craftbukkit build 478, plugin v0.8.5, I get this error at bootup:

    22:57:58 [SEVERE] Could not load plugins\BackupPlugin.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.mysticx.bukkit.backupplugin.Back
    upPlugin.<init>()
    at java.lang.Class.getConstructor0(Class.java:2706)
    at java.lang.Class.getConstructor(Class.java:1657)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:75)
    ... 8 more
     
  8. Offline

    _Oni_

    See above....
    --- merged: Feb 28, 2011 11:06 PM ---
    Maybe you have right, I will do that this week.
     
  9. Offline

    Maddin

    Nice ill install it, because one world was deleted by a failed craftbukkit build :(
     
  10. Offline

    _Oni_

    This plug can does backup every hour every x hours/minutes/day, look config file...
     
  11. Offline

    KCMO_HITMAN

    yes default time units are minutes but can be changed to hours and days if needed
     
  12. Offline

    _Oni_

    It's exactly that
     
  13. Offline

    RTRD

    Does not work for Bukkit 468, I get this error:
    Code:
    2011-03-01 18:40:18 [SEVERE] Could not load plugins\BackupPlugin.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.mysticx.bukkit.backupplugin.BackupPlugin.<init>()
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.getConstructor(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
    ... 8 more
     
  14. Offline

    John Barney

    I've never been on a forum before where the users refuse to read at least 2 pages back before posting =( twice this page alone!
     
  15. Offline

    4am

    Offtopic for a sec: Although the UI is a pleasure to work with, I find that the subtle divisions between posts and the sudden stark divide made my reply boxes makes it difficult to peruse over causally.
     
  16. Offline

    blucat

    I was using this plugin when my server was running hey0's mod, since backup the folder doesn't seem to be working correctly. At least I haven't gotten it working, so I wrote 2 shell scripts to do the job. One of the dependencies of the scripts is remote toolkit simply to run the save-all command.

    added "nohup sh backup > backup.log &" to my start server shell script.

    #!/bin/bash
    #backup script
    dir=world-backups
    for (( ; ; ))
    do
    ./mcr
    rm $dir/`ls -1t world-backups/ | tail -1`
    rm -r $dir/temp
    cp -r world $dir/temp
    zip -rq9 $dir/world_`date +"%Y%m%d"`-`date +%s` world
    sleep 2000 #based on seconds
    done

    #!/usr/bin/expect
    #Automated Telnet to Remote Toolkit file name of mcr
    spawn telnet localhost 25561
    expect "username:"
    send "myusername\n"
    expect "password:"
    send "mypassword\n"
    expect "Connected to console!"
    send "save-all\n"
    expect eof
     
  17. Offline

    D-Kalck

    This is what I get when I try a /map true :
    Code:
    11:17:58 [INFO] [BackupPlugin]  DarrenKalck triggered world mapping. force = true
    11:17:58 [INFO] [BackupPlugin]  Starting map generation process.. this could take a while!
    11:17:58 [INFO] [BackupPlugin]  Rebuilding Cache. This can take several minutes, depending on the world size.
    11:17:58 [INFO] [BackupPlugin]  Deleting cache, might be obsolete.
    11:17:58 [INFO] CONSOLE: Enabling level saving..
    11:17:58 [INFO] CONSOLE: Forcing save..
    11:17:58 [INFO] Saving chunks
    11:17:58 [INFO] CONSOLE: Save complete.
    11:17:58 [INFO] CONSOLE: Disabling level saving..
    11:18:05 [INFO] [BackupPlugin]  Mapping pass 1 of 2...
    11:18:05 [INFO] CONSOLE: Enabling level saving..
    11:18:06 [ATTENTION] [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    11:18:06 [INFO] [BackupPlugin]  Mapping pass 2 of 2...
    11:18:07 [ATTENTION] [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    11:18:07 [INFO] [BackupPlugin]  Mapping process finished.
    And with a /map
    Code:
    11:18:43 [INFO] [BackupPlugin]  DarrenKalck triggered world mapping. force = false
    11:18:43 [INFO] [BackupPlugin]  Starting map generation process.. this could take a while!
    11:18:43 [INFO] [BackupPlugin]  Mapping pass 1 of 2...
    11:18:43 [INFO] CONSOLE: Enabling level saving..
    11:18:43 [INFO] CONSOLE: Forcing save..
    11:18:43 [INFO] Saving chunks
    11:18:43 [INFO] CONSOLE: Save complete.
    11:18:43 [INFO] CONSOLE: Disabling level saving..
    11:18:43 [INFO] CONSOLE: Enabling level saving..
    11:18:44 [ATTENTION] [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    11:18:44 [INFO] [BackupPlugin]  Mapping pass 2 of 2...
    11:18:44 [ATTENTION] [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    11:18:44 [INFO] [BackupPlugin]  Mapping process finished.
    
    Here is my config.properties
    Code:
    #BackupPlugin Config File
    #Wed Mar 02 10:11:06 CET 2011
    debug=false
    level-name=world5
    automap-period=0
    time-unit=HOURS
    mapper-executable=tools/mcmap
    backup-history=40
    authorized-users=
    use-latest=false
    temp-path=world-backups/temp
    log-level=INFO
    map-path=world-maps
    map-options=-biomes -colors tools/mcmap_colors_new.txt -west -png -file $o $w;-night -biomes -colors tools/mcmap_colors_new.txt -west -png -file $o $w
    backup-path=world-backups
    cache-lifetime=30
    autobackup-period=8
    first-run=1200
    
    I use mcmap 2.0c and Minecraft Biome Extractor v0.8
    When I launch directly this command from the bukkit root directory, it works :
    tools/mcmap -biomes -colors tools/mcmap_colors_new.txt -west -png -file test.png world5

    Would it be possible to see the output of the mapper when debug= true ?
     
  18. Offline

    IndianaX

    @_Oni_: Thx for the update!

    I have log-level=SEVERE but I allways see the following chat:
    [INFO] CONSOLE: Enabling level saving..
    [INFO] CONSOLE: Forcing save..
    [INFO] Saving chunks
    [INFO] CONSOLE: Save complete.
    [INFO] CONSOLE: Disabling level saving..
    [INFO] CONSOLE: Enabling level saving..

    Is it posible to remove these messages and have only one message to all "[SERVER] Saving Map"?
     
  19. Offline

    _Oni_

    I can't, this messages are from save-on/save-all/save-off commands and you have this messages if you are OP (If i'm not wrong)
    But maybe, I could have a new way to force save map in disk (more clean and less annoying before do backup/mapping ;)
     
  20. Offline

    tips48

    needs a update...
     
  21. Offline

    Xin_TiGeR

    i dont get it...

    why is the most important plugin for minecraft servers still not updated? this is vital for those typical bukkit crashes..

    since v1.3 that this plugin is worthless... it saves the map but the rar is turned in an ugly txt full of strange characters...
     
  22. Offline

    _Oni_

    See previous pages...
    Otherwise, The plugin has never used RAR format, if I remember, for backup (only ZIP) and since Minecraft Beta 1.3, the save format has changed.
     
  23. Offline

    Xin_TiGeR

    i´ve read all pages and i´ve update it but in the past backup used to save my world in rar files, now it continues to save but they are all messed up.. i presume its because the new world save format that was implemented on v1.3
     
  24. Offline

    _Oni_

    It's and It always was ZIP files for backup, new save format don't change anything beside the content of backup
    --- merged: Mar 3, 2011 1:18 AM ---
    I try to look it's, a little, but I have the same error and, I don't get output/error of the mapper for the moment.

    EDIT : With /loglevel FINEST, you should have output/error in log when you do a /map (but I have anything in my side).
    I need more time to investigate.
     
  25. Offline

    Jobsti

    @_Oni_
    Big thanks for your fix. Works with #493!
     
  26. Offline

    CullenShane

    Sorry for the bother, but how do I use this with mutliworld?
     
  27. Offline

    _Oni_

    You can't, you can use only for backup one world, for the moment
     
  28. Offline

    Oscarius

    I can't get the mapping process to work, any idea why?

    Console (read from bottom to top)
    Code:
    03.03 19:11:05 [Server] INFO [BackupPlugin]  Mapping process finished.
    03.03 19:11:05 [Server] WARNING [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    03.03 19:11:03 [Server] INFO CONSOLE: Forcing save..
    03.03 19:11:03 [Server] INFO CONSOLE: Enabling level saving..
    03.03 19:11:03 [Server] INFO [BackupPlugin]  Mapping pass 1 of 1...
    03.03 19:11:03 [Server] INFO [BackupPlugin]  Starting map generation process.. this could take a while!
    03.03 19:11:03 [Server] INFO [BackupPlugin]  pausekuk triggered world mapping. force = false
    config.properties
    Code:
    #BackupPlugin Config File
    #Mon Feb 28 08:21:13 CET 2011
    debug=false
    level-name=world
    automap-period=12
    time-unit=HOURS
    mapper-executable=/ubercraft/mcmap/mcmap
    backup-history=336
    use-latest=false
    authorized-users=pausekuk
    temp-path=backup/temp
    log-level=INFO
    map-path=/var/www/maps
    map-options=-png -file $o $w
    backup-path=backup
    cache-lifetime=30
    autobackup-period=1
    first-run=1200
    
    ls -l /var/www
    Code:
    drwxrwsrwx 2 minecraft www-data     4096 2011-03-03 19:11 maps
     
  29. Offline

    MasterMeNL

    I decided to post my c10t map options line here.
    It only renders Isometric at night in the normal world and in the nether world (NetherGate plugin)
    Code:
    map-options=--memory-limit 512 -w $w -o $o -z --night; --memory-limit 512 -w C:\\Users\\[USERNAME]\\AppData\\Roaming\\.minecraft.server\\nether -o C:\\Users\\[USERNAME]\\AppData\\Roaming\\.minecraft.server\ServerNetherMaps -z --night --hell-mode
    It has a max memory limit of 512 mb so it'll use cache and won't bug my computer (I run the server and client on my own computer) to much, make sure to change "[USERNAME]" to your username and replace the server path to something different if you don't use the same path.
    Also, if your not on windows, replace "\\" by "\".

    - MasterMe
     
  30. Offline

    CullenShane


    Code:
    03.03 19:11:05 [Server] WARNING [BackupPlugin]  Mapping failed, something went wrong while executing external code! Exit Status: 141
    The mapper is exiting with code 141 instead of 0 (success). So it's throwing some sort of error. Run the mapper with the command you're giving it from BackupPlugin to see the error it's throwing. I ran into this at some point, I don't remember exactly how I worked it out, but that's one of the steps I took.
     
  31. Offline

    Oscarius

    Okay, I did that and it worked. The command I used was:
    Code:
    minecraft@nusse:/ubercraft/mcmap$ ./mcmap -png -file /var/www/maps/test2.png /ubercraft/world
    Any idea why it won't work normally?
     

Share This Page