[INACTIVE][ADMN] BackupPlugin v0.8.8 (Backups & Maps - Fork from MysticX's plugin) [670]

Discussion in 'Inactive/Unsupported Plugins' started by _Oni_, Mar 5, 2011.

  1. Offline

    _Oni_

    BackupPlugin
    Version: v0.8.8

    This plugin allows you to create world backups or to generate world maps automatically or via ingame command.
    It's a fork of MysticX's BackupPlugin : http://forums.bukkit.org/threads/895/

    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 (0.8.5, I guess) file (for mcmap): here
    MysticX's properties file (0.8.5) (for c10t): here

    Permissions

    My version supports Permissions (from 2.0, if you have a problem with Permissions plugin report this) and GroupManager (1.0)
    • BackupPlugin.backup : for /backup command
    • BackupPlugin.map : for /map command
    • BackupPlugin.admin : for /loglevel and /breload
    Donwload and Source Code
    Download last version
    Source Code

    Changelog
    Show Spoiler

    Version 0.8.8
    • Fix Backup History
    • Improve how calc first run time (could fix some date problem)
    Version 0.8.7
    • Change method to save world in disk before backup/mapping
    Version 0.8.6.1
    • Fix mapping
    • Remove debug option (use loglevel FINEST instead)
    Version 0.8.6
    • Command can use in console server now
    • Try to do save-all before backup and mapping (I have to change this, it's not ok, I think)
    • Add a debug option
    • Cleaning code again
    Version 0.8.5-SNAPSHOT
    • Some fix for recent build of craftbukkit
    • Move from GroupUsers plugin to Permissions plug
    • Move BackupPlugin.properties to plugins/BackupPlugin/config.properties
    • Add a temp-path option to define temp folder for cache
    • Cleaning code

    TODO
    • Add a multiworld support (WiP)
    PS : I know, I did much copy-paste from MysticX's thread but It was only a fork from his code and I didn't much change, for the moment. ;)
     
    DiddiZ, MasterMeNL, IndianaX and 2 others like this.
  2. Offline

    saku

    Heyo, Oni. I'm having trouble making this plugin work, and I'd be very grateful for any help. I've downloaded the .jar (and config?) and put it all in /plugins. The Config file looks like this:

    Show Spoiler

    #BackupPlugin Config File
    #Sat Mar 12 12:59:16 EST 2011
    level-name=world
    automap-period=0
    time-unit=MINUTES
    mapper-executable=mcmap\\mcmap.exe
    backup-history=5
    authorized-users=myusername
    use-latest=false
    log-level=INFO
    temp-path=world-backups/temp
    map-path=world-maps
    map-options=-png -file $o $w;-night -png -file $o $w
    backup-path=world-backups
    first-run=1200
    autobackup-period=0
    cache-lifetime=30


    ..where instead of myusername, under authorized-users, is my actual username. When I log on the server and write /help (I have essentials installed) it shows the commands for BackUp indeed. Yet, when I write /backup, no response comes in chat, so I presume it doesn't work for me. The name of the world is indeed world as set in the config, and yeah.. Am I missing something? I tried giving the permission through permissions instead, but that didn't work either. (Not that I'm sure, I've set up permissions properly. Shouldn't matter anyhow if I can do it directly from Backup. )

    Thanks.
     
  3. Offline

    fnool

    Is there a guide to using map-options available?
     
  4. Offline

    _Oni_

    If you use Permissions plugins, you have to used it for Backup Plugin...
    Have you got anything in server log?
    And when you try to use backup in server console, does it anything?
    It's depend of mapping tool that you are using.
    Otherwise $o for output file
    $w for world path
     
  5. Step 1: download jar
    Step 2: start server
    Step 3: type the commands

    no response from console :(
     
  6. Offline

    TheJSeb

    I tried it. It seems the command works well, but I cannot find the folder where my backups are saved. Any idea where it should be?

    Thanks
     
  7. Offline

    _Oni_

    By default, in world-backups folder. This folder is in your craftbukkit folder.
     
  8. Offline

    IndianaX

    Good Job! Works great for me.
     
  9. How do i configure it ?
     
  10. Maybe you could add to the first post some description to what all the settings available are and how they work.

    some are confusing, like the setting how long backups are to be kept, is it also in minutes? if you set the units to that, or is it always days?
     
  11. Offline

    MacG32

    Confirmed working with build #556. [​IMG]
     
  12. Offline

    xZise

    Nice plugin (instead of this mapping overhead), but sometimes I get errors, that the file was changed:
    Code:
    2011-03-13 02:29:58 [INFO] [BackupPlugin]  Starting backup process..
    2011-03-13 02:29:58 [SEVERE] java.io.IOException: Stream Closed
    2011-03-13 02:29:58 [SEVERE]    at java.io.RandomAccessFile.seek(Native Method)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.RegionFile.a(SourceFile:342)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.RegionFile.a(SourceFile:279)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.ChunkBuffer.close(SourceFile:259)
    2011-03-13 02:29:58 [SEVERE]    at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:166)
    2011-03-13 02:29:58 [SEVERE]    at java.io.FilterOutputStream.close(FilterOutputStream.java:160)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.ChunkRegionLoader.a(SourceFile:59)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.ChunkProviderServer.b(ChunkProviderServer.java:156)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.ChunkProviderServer.a(ChunkProviderServer.java:186)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.World.a(World.java:135)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.World.g(World.java:1429)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:348)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    2011-03-13 02:29:58 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Code:
    2011-03-13 02:59:59 [SEVERE] [BackupPlugin]  Error while zipping temp folder!
    java.io.FileNotFoundException: world-backups/temp/region/r.-2.-1.mcr (No such file or directory)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(FileInputStream.java:137)
            at com.mysticx.bukkit.backupplugin.IOHelper.zip(IOHelper.java:76)
            at com.mysticx.bukkit.backupplugin.IOHelper.zip(IOHelper.java:74)
            at com.mysticx.bukkit.backupplugin.IOHelper.zipDirectory(IOHelper.java:59)
            at com.mysticx.bukkit.backupplugin.CacheControl.persistCache(CacheControl.java:280)
            at com.mysticx.bukkit.backupplugin.BackupUnit.run(BackupUnit.java:67)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
            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)
    Also I would suggest to add an option, that they will create only backups if anyone is on the server (and one after all players left).

    Fabian
     
  13. Offline

    RazMaTaz

    I like that Idea! :)

    Just got this error, has been running ok.

    Code:
    13:59:48 [INFO] [BackupPlugin]  Starting backup process..
    13:59:48 [INFO] [BackupPlugin]  Rebuilding Cache. This can take several minutes,
     depending on the world size.
    13:59:48 [INFO] [BackupPlugin]  Deleting cache, might be obsolete.
    13:59:48 [SEVERE] [BackupPlugin]  Error rebuilding cache:
    java.io.FileNotFoundException: MysticForest\level.dat_old (The system cannot fin
    d the file specified)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(Unknown Source)
            at com.mysticx.bukkit.backupplugin.IOHelper.copyFile(IOHelper.java:127)
            at com.mysticx.bukkit.backupplugin.IOHelper.copyDir(IOHelper.java:113)
            at com.mysticx.bukkit.backupplugin.CacheControl.rebuildCache(CacheContro
    l.java:254)
            at com.mysticx.bukkit.backupplugin.CacheControl.getCache(CacheControl.ja
    va:220)
            at com.mysticx.bukkit.backupplugin.CacheControl.persistCache(CacheContro
    l.java:276)
            at com.mysticx.bukkit.backupplugin.BackupUnit.run(BackupUnit.java:67)
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
    
            at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$101(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    runPeriodic(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
    )
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    13:59:48 [WARNING] [BackupPlugin]  Cache couldn't be rebuilt!
    13:59:48 [SEVERE] [BackupPlugin]  Error while zipping temp folder!
    java.util.zip.ZipException: ZIP file must have at least one entry
            at java.util.zip.ZipOutputStream.finish(Unknown Source)
            at java.util.zip.DeflaterOutputStream.close(Unknown Source)
            at java.util.zip.ZipOutputStream.close(Unknown Source)
            at com.mysticx.bukkit.backupplugin.IOHelper.zipDirectory(IOHelper.java:6
    3)
            at com.mysticx.bukkit.backupplugin.CacheControl.persistCache(CacheContro
    l.java:280)
            at com.mysticx.bukkit.backupplugin.BackupUnit.run(BackupUnit.java:67)
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
    
            at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$101(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    runPeriodic(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
    )
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    13:59:48 [WARNING] [BackupPlugin]  Backup failed
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016
  14. Offline

    monir

    is 10 backups maxium? i tryed to set to 30 then i got java error
     
  15. Offline

    Joseph3114

    After updating I only get " World World don't exist".
    My world is "/hgsbackup/world".
    Code:
    #BackupPlugin Config File
    #Sat Mar 19 00:04:30 EDT 2011
    level-name=/HGSBackup/World
    automap-period=0
    time-unit=MINUTES
    mapper-executable=mcmap/mcmap.exe
    backup-history=5
    authorized-users=
    use-latest=false
    log-level=INFO
    temp-path=world-backups/temp
    map-path=world-maps
    map-options=-png -file $o $w;-night -png -file $o $w
    backup-path=world-backups
    first-run=1200
    autobackup-period=0
    cache-lifetime=30
    
     
  16. Offline

    RazMaTaz

    I currently have mine set to 48 but for some reason I have 66 items in my world backup folder.

    Also I Think this is the same error as some other have also reported.

    Code:
    20:59:38 [INFO] [BackupPlugin]  Starting backup process..
    20:59:38 [SEVERE] java.io.IOException: The handle is invalid
    20:59:38 [SEVERE]       at java.io.RandomAccessFile.seek(Native Method)
    20:59:38 [SEVERE]       at net.minecraft.server.RegionFile.a(SourceFile:342)
    20:59:38 [SEVERE]       at net.minecraft.server.RegionFile.a(SourceFile:279)
    20:59:38 [SEVERE]       at net.minecraft.server.ChunkBuffer.close(SourceFile:259
    )
    20:59:38 [SEVERE]       at java.util.zip.DeflaterOutputStream.close(Unknown Sour
    ce)
    20:59:38 [SEVERE]       at java.io.FilterOutputStream.close(Unknown Source)
    20:59:38 [SEVERE]       at net.minecraft.server.ChunkRegionLoader.a(SourceFile:5
    9)
    20:59:38 [SEVERE]       at net.minecraft.server.ChunkProviderServer.b(ChunkProvi
    derServer.java:156)
    20:59:38 [SEVERE]       at net.minecraft.server.ChunkProviderServer.a(ChunkProvi
    derServer.java:186)
    20:59:38 [SEVERE]       at net.minecraft.server.World.a(World.java:135)
    20:59:38 [SEVERE]       at net.minecraft.server.World.g(World.java:1435)
    20:59:38 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:348)
    20:59:38 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:272)
    20:59:38 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:366)
     
  17. Offline

    TheDarkness73

    How do we reload a world?

    And does it automatically save or do we have too?

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

    John Barney

    I would -really- like to see Multiworld support if you get some free time Oni. Thanks so much for updating this project.
     
  19. Code:
    
    11:19:29 [INFO] [BackupPlugin]  BackupPlugin version 0.8.7 is enabled!
    11:19:29 [INFO] [BackupPlugin]  No group users plugin found, falling back to own
     config!
    11:19:29 [WARNING] [BackupPlugin]  Disabled MapperUnit, mapper_path invalid: mcm
    ap\mcmap.exe
    11:19:29 [WARNING] [BackupPlugin]  Failed to parse firstRun, disabled automatic
    execution
    java.text.ParseException: Unparseable date: "5"
            at java.text.DateFormat.parse(Unknown Source)
            at com.mysticx.bukkit.backupplugin.BackupPlugin.calcNextPointOfTime(Back
    upPlugin.java:237)
            at com.mysticx.bukkit.backupplugin.BackupPlugin.load(BackupPlugin.java:1
    68)
            at com.mysticx.bukkit.backupplugin.BackupPlugin.onEnable(BackupPlugin.ja
    va:77)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:85)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
            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)
    
    >
    This plugin allways fail.
     
  20. Offline

    RazMaTaz


    1. Shutdown your server, and unzip one of the backups in the location you have specified in the config overwriting your world files.

    2. Correct me if I'm wrong but best I can tell autosave only works if you change the config to save at your specified interval. Default is 0. Thats my experience anyways.


    On another note my backup folder now has 117 zips in there.. thought it was only supposed to keep 48 according to my config.
     
  21. Offline

    elitestryker

    It would be great if there was a customizable message that appeared whenever the server was saving... I hope you consider adding that capability.

    Otherwise, great job!
     
  22. Offline

    RazMaTaz

    TheDarkness73

    Btw- I also started using WorldEdit and setup its snapshot folder to be the BackupPlugin backup folder, and I am now able to restore sections from those backup file while in game. Very nice. :) I currently have backups being done every 30 minutes..
    Also- The files keep climbing like history is not working.. And I don't ever see a notice about deleting/removing files.

    Thanks Oni! Hope you get back on! :)
     
  23. Offline

    Robby Stolle

    I LOVE YOU!!!!!!!!!!!!!! lol just one question can that config file be modded to the the entire minecraft server folder? or do I just need to put all the files I want to back up in the level-name= line.
     
  24. Offline

    Bjourk

    I have "backup-history=8" in my preferences, but BackupPlugin has created 380 backups, amounting to almost 4 GB. WTF?!
     
  25. Offline

    RazMaTaz

    I have the same issue here.. :( I thought I seen someone say if its 5 or less then it works.. but I could be wrong.
     
  26. Offline

    Scooter789

    I'm having an odd issue where the contents of my world/ directory is being duplicated to my server root directory. By this I mean, i have :
    players/
    region/
    level.dat
    level.dat_old
    session.lock

    in both my world/ directory, AND in one directory up, next to craftbukkit.jar and server.properties and such.

    I think it's caused by this plugin, but I'm not completely certain. Thoughts?

    EDIT:
    forgot to mention...
    Code:
    02:08:10 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    
     
  27. Is there a way to turn off this mapping function?
    It doesn't work for me or I don't have this mcmap.exe file anyhow, why isn't this included in the package in the first place?
    Well I also think that it wouldn't work since I am running this on a rental server on linux, but I just don't like the unnecessary error in my console output.
     
  28. Offline

    thiefzer0

    Same, I would like to find a way to turn off the mapper function. It is useless to me and only causes console spam (unless someone can recommend a quality mapping plugin!).

    ~thief
     
  29. Offline

    RazMaTaz

    A one line message stating mapper is disabled is spam? It does not repeat that I see and only shows on server start or am I missing something?
     
  30. Offline

    xZise

    For me it is not relevant, but I hope that this feature doesn't make it harder to support this plugin.

    Fabian
     
  31. I know it isn't spam, simply because of the fact that it is just one message.
    On the other hand however, when you try to get a server up and running you would be happy to see as little warning or error messages inside the console log window as possible.
    Second issue here, the backup plugin does work without the mapper plugin, so I think this is doing something completely else, since it's not working for me I don't know what it does in the first place.
    Also when it doesn't work there should be some way to turn it off, even when it was just to get rid of that single message, or maybe loosen up some memory, since this also is an issue.
    Most plugins including this one have a settings file, so I am only asking if it is possible to turn off the mapper function in the first place.
     

Share This Page