[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

    TnT Retired Staff

    I've tried running the commands in game, but I'm getting unrecognized command on either /map or /breload. Also, when we do get the log file, where is it supposed to be generated?
     
  3. Offline

    MysticX

    It's the normal server.log
     
  4. Offline

    TnT Retired Staff

    Got this error. Build 79, BackupPlugin 0.8.3.
    Code:
    2011-01-17 23:20:03 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.MapperUnit) Starting map generation process.. this could take a while!
    2011-01-17 23:20:03 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Rebuilding Cache. This can take several minutes, depending     on the world size.
    2011-01-17 23:20:12 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.MapperUnit) Mapping pass 1 of 1...
    2011-01-17 23:31:34 [WARNING] [BackupPlugin] (com.mysticx.bukkit.backupplugin.MapperUnit) Mapping failed, something went wrong while executing exte    rnal code! Exit Status: 134
    2011-01-17 23:31:34 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.MapperUnit) Mapping process finished.
    Trying this properties file - using c10t. Ubuntu x64 10.10.

    Code:
    #BackupPlugin Config File
    #Mon Jan 17 17:52:07 MST 2011
    level-name=world
    automap-period=12
    time-unit=HOURS
    mapper-executable=/opt/c10t/c10t
    backup-history=5
    authorized-users=
    use-latest=false
    log-level=INFO
    map-path=/opt/pictures
    map-options=-w $w -o $o -nz --show-players --ttf-path /usr/share/fonts/truetype/freefont/FreeSans.ttf
    backup-path=world-backups
    first-run=1145
    autobackup-period=0
    cache-lifetime=10
    I don't need a 10 hour cache lifetime, but that was the file I used when I got the error. I will try again with a newer version of Craftbukkit and BackupPlugin 0.8.5 tonight.

    Also, I could not get the commands to work, either in game, or in the server console. In game tried: /map, /#map, /breload, /#breload - none work. In console tried map, #map, etc. Same idea. I know Craftbukkit build 70+ changed the way commands were executed, not sure if that matters for your plugin.
    Code:
    2011-01-18 10:19:15 [INFO] TnTBass issued server command: map
    2011-01-18 10:19:15 [INFO] Unknown console command. Type "#help" for help.
    2011-01-18 10:19:21 [INFO] TnTBass issued server command: #map
    2011-01-18 10:19:21 [INFO] Unknown console command. Type "#help" for help.
    2011-01-18 10:19:36 [INFO] TnTBass lost connection: disconnect.quitting
    
     
  5. Offline

    MysticX

    First try to move the font you are using in the mapper directory and use this option line:
    map-options=-w $w -o $o -nz --show-players --ttf-path $m/FreeSans.ttf

    But don't think that's the issue. The mapper seems to have problems somewhere (not enough rights on the folder, etc.), but I can't see what went wrong. I need more log information, so please change log-level to FINEST and repost your logs.

    The reason why your ingame commands aren't working, is that you forgot to set you as authorized user, that should be fixed with
    authorized-users=TnTBass
     
  6. Offline

    TnT Retired Staff

    Will do.

    Makes sense, should have realized that. I'll fix that up.

    Still ran into problems. Logs. BackupPlugin.properties file.

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

    MysticX

    Yeah, that new log is better =)
    The properties file also looks fine.
    As far as I can see, it's not the plugins fault, but rather c10t's. It fails at some point, to be seen here:

    2011-01-18 18:42:45 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.AsyncStreamReader) [DEBUG] (ERROR) c10t: src/image/cached_image.cpp:124: virtual void cached_image::blend_pixel(uint64_t, uint64_t, color&): Assertion `bp < buffer_s' failed.

    This seems to be an error in c10t itself. Maybe you can try a newer version, if existing, or fall back to an older one.
    Can you run c10t manually without error? Try executing this in your shell:

    /opt/c10t/c10t -w /opt/minecraft/craftbukkit/world-backups/temp -o /opt/minecraft/craftbukkit/pictures/world_20110118-1838130692.png -nz --show-players --ttf-path /opt/c10t/FreeSans.ttf

    Sorry that I can't help you any more :\
     
  8. Offline

    TnT Retired Staff

    Same error. I don't get it, it was working before. :(

    I did find out why though, just as I was about to post that, I thought, "I've had this shit working. What's changed?"

    Then I remembered I wanted to change the map and use option 'z' (Isometric rendering) instead of y (Oblique angle rendering). I tried Oblique again and it works fine. I wanted Isometric though :(
     
  9. Offline

    Jobsti

    I use c10t 1.4 with this params:

    Code:
    mapper-executable=/minecraft/minecraftserver/main/bin/c10t-1.2//c10t
    Code:
    map-options=-w /minecraft/minecraftserver/temp/bukkit/world2/ -o /srv/www/htdocs/minecraft/day.png -q --memory-limit 256; -w /minecraft/minecraftserver/temp/bukkit/world2/ -o /srv/www/htdocs/minecraft/night.png -q -n --memory-limit 256; -w /minecraft/minecraftserver/temp/bukkit/world2/ -o /srv/www/htdocs/minecraft/nite2.png -z -n --memory-limit 256
    And for my nether:
    Code:
    map-options=-w /minecraft/minecraftserver/hoelle/bin/hoelle/DIM-1/ -o /srv/www/htdocs/minecraft/hday.png -q -N --hell-mode --memory-limit 256; -w /minecraft/minecraftserver/hoelle/bin/hoelle/DIM-1/ -o /srv/www/htdocs/minecraft/hnite2.png -z -N --hell-mode --memory-limit 256;
    
     
  10. Offline

    Herr Riz

    If I point the mapper path at a shell script (one I made to generate four different maps and put them on my website), would it work?
     
  11. Offline

    Jobsti

    I think it's no problem with c10t.
     
  12. Offline

    TnT Retired Staff

    I run c10t version 1.4, build 65. Likely a bug in his newer versions.

    Build 66 fixes this error so the map can get generated. (Link to the recent Linux x86_64 binary).

    Thank you for your help on this MysticX - love the plugin.

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

    talbot

    ok i figured out that i hadn't put myself in the authorized users list, my mistake. but now a new error all together. my console is spammed with the following when i use /backup.

    Code:
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/level.dat_new (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    java.io.FileNotFoundException: ./world/tmp_chunk.dat (Disk quota exceeded)
    
    and the following is my server log set to FINEST

    Code:
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupPluginPlayerListener) syrhtalbot triggered world backup. force = false
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Starting backup process..
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.PluginUnit) [DEBUG] Generated filename: world_20110119-1541360026.zip
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] Persisting cache / creating zip file..
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Rebuilding Cache. This can take several minutes, depending on the world size.
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] deleteCache() obtaining lock..
    2011-01-19 15:41:36 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Deleting cache, might be obsolete.
    2011-01-19 15:41:37 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] deleteCache() unlocked..
    2011-01-19 15:41:37 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] rebuildCache() obtaining lock..
    2011-01-19 15:41:37 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] rebuildCache() got lock, copy dir..
    2011-01-19 15:43:35 [SEVERE] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Error rebuilding cache:
    java.io.FileNotFoundException: /minecraft/backups/temp/e/k/c.-fm.-18.dat (Disk quota exceeded)
    	at java.io.FileOutputStream.openAppend(Native Method)
    	at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
    	at com.mysticx.bukkit.backupplugin.IOHelper.copyFile(IOHelper.java:131)
    	at com.mysticx.bukkit.backupplugin.IOHelper.copyDir(IOHelper.java:111)
    	at com.mysticx.bukkit.backupplugin.IOHelper.copyDir(IOHelper.java:106)
    	at com.mysticx.bukkit.backupplugin.IOHelper.copyDir(IOHelper.java:106)
    	at com.mysticx.bukkit.backupplugin.CacheControl.rebuildCache(CacheControl.java:268)
    	at com.mysticx.bukkit.backupplugin.CacheControl.getCache(CacheControl.java:229)
    	at com.mysticx.bukkit.backupplugin.CacheControl.persistCache(CacheControl.java:291)
    	at com.mysticx.bukkit.backupplugin.BackupUnit.run(BackupUnit.java:63)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:636)
    2011-01-19 15:43:35 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] rebuildCache() unlocked..
    2011-01-19 15:43:35 [WARNING] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Cache couldn't be rebuilt!
    2011-01-19 15:43:35 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] persistCache() got cache, obtaining lock..
    2011-01-19 15:43:35 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] persistCache() got lock, starting zip operation..
    2011-01-19 15:43:35 [SEVERE] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Error while zipping temp folder!
    java.io.IOException: Disk quota exceeded
    	at java.io.UnixFileSystem.createFileExclusively(Native Method)
    	at java.io.File.createNewFile(File.java:900)
    	at com.mysticx.bukkit.backupplugin.IOHelper.zipDirectory(IOHelper.java:57)
    	at com.mysticx.bukkit.backupplugin.CacheControl.persistCache(CacheControl.java:297)
    	at com.mysticx.bukkit.backupplugin.BackupUnit.run(BackupUnit.java:63)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:636)
    2011-01-19 15:43:35 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) [DEBUG] persistCache() unlocked..
    2011-01-19 15:43:35 [WARNING] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Backup failed
    2011-01-19 15:43:35 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.PluginUnit) [DEBUG] Resetting force to true
    
     
  14. Offline

    SeeD419

    Is this working on 106?

    I could have really used this earlier :(
     
  15. Offline

    Jobsti

    Works.. no Errors, make Backups and maps.
     
  16. Offline

    drei941

    hi,
    first of all, i really love this :)
    this and worldedits restore area saved me from lots of frustration, and it really works very well for now.
    so, thank you. i failed at manual backups far too often to not be reaaaally thankful for this [​IMG]

    but there's one trivial thing i'd like changed.
    the first-run option.

    i'm running a tiny, local server, playing with some of my friends.
    so i restart the server at least once a day, because there is no sense in keeping it, and my pc, running 24/7.

    i'd like a "startup" option for first-run, or just remove first-run from the config to enable backups on startup. because when i forget to run a backup manually after server restart, your plugin won't start making backups until the specified time.

    i saw you included the source and actually i'd change this myself but i never built a java app before and i don't feel like digging into the matter right now. also, i think the "backups on startup" option would be useful to others as well.

    i'd be glad if you could change that. otherwise i guess i'll just dig into it myself and leave some code here when i'm done :)

    ps.
    why is there a first-run option anyways? why wouldn't anyone want to enable backups right from server startup time? i just don't get it [​IMG]

    and sorry for this length of text... i tend to write too much [​IMG]
     
  17. Offline

    rjwboys

    ok right away i can see what YOUR problem is, "(Disk quota exceeded)" your out of space on your hard drive
     
  18. Offline

    racu

    not work /backup , /map in #114 [​IMG]
     
  19. Offline

    Jobsti

    #115

    /backup and /map
    Still work
     
  20. Offline

    MysticX

    I'm glad to hear that you like my plugin :)

    It used to make backups at the start-up, but somebody requested to at a config line for a start time. So I added it. Many diffferent people, many different needs I guess ;)

    I'll just add the possibility to leave the field blank for backups at server startup!

    I'll check this later, thanks. Are you sure that you have added yourself to the the authorized-users line in the config?




    Thanks for verify! Maybe it's a problem with your config then, racu
     
  21. Offline

    SeeD419

    Okay so from the first post I see a lot of things aren't working correctly.

    From the looks of it, it can only do manual backups as of now?
     
  22. Offline

    Galrath

    Automated backups work fine.
     
  23. Offline

    SeeD419

    Thanks for the response. Will test this on build 115.
     
  24. Offline

    racu

    Oh Thanks, I'll update 0.8.4 to 0.8.5 so I don't recognize authorized-users line.

    THK. This plugin is awesome[​IMG]
     
  25. Offline

    drei941

    great! looking forward to that update. but take your time. it's not like it's urgent :)
     
  26. Offline

    SeeD419

    This isn't creating any backups at all O_O

    Build 115. Latest version. Settings configured. There is no world-backup folder. This has been running for more than enough time...

    Edit: I triggered it manually...seems to be working...like I said before though, does automated work? I'm being told yes but obviously not...

    #BackupPlugin Config File
    #Fri Jan 21 04:22:51 CST 2011
    level-name=world
    automap-period=0
    time-unit=MINUTES
    mapper-executable=mcmap\\mcmap.exe
    backup-history=5
    authorized-users=seed419
    use-latest=false
    log-level=INFO
    map-path=world-maps
    map-options=-png -file $o $w;-night -png -file $o $w
    backup-path=world-backups
    first-run=1200
    autobackup-period=180
    cache-lifetime=1280
     
  27. Offline

    MysticX

    Automatic backups are supposed to work.
    Your config looks good, please set loglevel to FINEST and paste your server.log when it should generate an automatic backup (You can set autobackup-period to 10 or something for testing purpose).
     
  28. Offline

    talbot

    i already thought of that. i have 100gb on my server. and a 300mb map.

    it seems that some files became corrupt because after i deleted everything and started over from scratch i haven't had any problems. i didn't have much of a choice, but i'm glad it's fixed.
     
  29. Offline

    Phanku

    Can i use Tectonicus with this?
     
  30. Offline

    Jobsti

    Automap works fine #115
     
  31. Offline

    Egonny

    I'm getting an error when updating:

     

Share This Page