[INACTIVE][ADMN] Backup 1.6 - A simple Backup Plugin [818]

Discussion in 'Inactive/Unsupported Plugins' started by Meldanor, Mar 25, 2011.

  1. Offline


    I've stopped the development of this plugin, becase I lost the motivation. The user 'gamerx93' will continue my work in this thread:


    Backup - A simple Backup Plugin :
    Version : 1.6

    After I've searched for a simple, but powerfull backup plugin, I've tried some backups, but some have bugs, other don't save the world before they zip and so on. So I decided to write my own backup plugin.

    • Automatically backups the server(all worlds) in a Intervall you've decided and zip it.
    • Saves every world running on the server and every player before the backup
    • Supporting Permission
    • Supporting manuel backups (you can use an ingame command or on the console)
    • Storing only a limit of backups that you've configure
    • You can set that only to backup when player are on the server
    • Stores also the plugin folder
    • Formate the date format

    Version 1.6:
    • Added option to control where the backups are getting stored
    • Fixed disabling broadcast messages
    • You can now use also the old save system, which is the same as before 1.5
    • Uses godsny's suggestion for the config file. Thanks !
    • Fixed bug deleting the custom dir when the maximum backup limit is hit!
    • Fixed bug stopping the complete backup if there is one file error!
    • Fixed bug not disabling the automatic backup when you set the BackupIntervall to -1
    Version 1.5:
    • Added property to also backup the plugin folder(is set to true by default)
    • Fixed issue with data corruption by using not thread save methods. Thanks to desmin88 for the hints!
    • All worlds(and when enabled the plugin folder) is stored in ONE ZIP
    • Customize the timestamp by merge a fork of xfxian . Thanks to xfxian!
    • You can now disable enabling the autosave (the command "save-on", not the backup cyclus!) by setting the property to true. It is false by default. Notify, that I will run the command "save-off" before I will start the backup to prevent unwished results!
    • When server is starting, the config.ini is checked now. If you don't have the current config.ini you can see on the console a error. Remove / relocate the config temporary to get the newest one.
    Show Spoiler

    Version 1.4a:
    • Fixed the bug " [Backup] Zipping backup is disabled! "
    Version 1.4:
    • Use ASyncMethod instead of SyncMethod (the lags should be gone)
    • Own broadcast messages ( change the message in you config.ini file)
    • A backup is run when the last player has left the server after the normal backup cyclus.
    • Remove worlds from backup (add the names of the worlds in your config.ini files)
    • Add an option to just store the worlds in dirs or zip them
    • Some minor improvements
    Version 1.3a:
    • You can now run a backup from the console using the command backup
    Version 1.3:
    • Implemented new function to only backup when player are online
    • Use Apache Common IO library instead of code from the internet for a better performance and better stability
    Version 1.2b:
    • Fixed bug with empty dirs
    Version 1.2a:
    • Fixed bug not creating config.ini
    Version 1.2:
    • Implement property so only ops can start manuell backups
    • Updated to recommened build 602
    • Tried to fix the problem with some system by using the system file seperator
    Version 1.1:
    • Added option to give manual backups a name(which will never automatically removed by auto backup)
    Version 1.0:
    • First release

    Just place it in your plugins dir

    Show Spoiler

    After the first start of the plugin it generates a config.ini in "plugins/Backup".
    Here is the current content:

    // --All variables are in minutes--
    // How often show the backup run? (#)
    // Notice: -1 Will disable automatic backups. You have to run the backups now manually!
    // How many backups are retained? If this limit is hit, the oldest backup will be removed. (#)
    // Only allow Ops to preform manual backups? (true/false)
    // Should backups only be preformed when there are players on the server?
    // Notice: When the last player leaves the server, a final backup will be made
    // within the backup cycle. The automatic backup cycle will resume when a player
    // joins. (true/false)
    // Server broadcast message when starting a backup.
    // Notice : Remove the messages(not the property) to disable a broadcast. (text)
    MessageStartBackup=Start backup
    // Server broadcast message when a backup is completed.
    // Notice : Remove the messages(not the property) to disable a broadcast. (text)
    MessageFinishBackup=Finished backup
    // Worlds that should not be archived by the server, seperate them by
    // a semicolon. (directory names)
    // Example : World1;World2;Nether
    // ZIP backups?
    // If enabled, backups will be compressed and stored in a ZIP archive named with
    // the current timestamp.
    // If disabled, the backup will stored in a folder with the timestamp. (true/false)
    // Custom date format string that is appended to every backup.
    // If left empty, the default date format is used.
    // This has to be a Java String.format string, see
    // http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax
    // for reference.
    // Example: -%1$tY%1$tm%1$td-%1$tH%1$tM%1$tS (YYYYMMDD-HHMMSS: 20101201-011323) (conforms to ISO 8601)
    // Enables the auto-save function after the backup.
    // Notice: If you set this to false, this plugin will backup your worlds but not save
    // the data from the memory to your hard disc. If the server crashes between
    // backups, all work is lost. Disable if you use another plugin to save the world
    // to disk (EG: autosave). (true/false)
    // Backup plugin directory? (true/false)
    // Location of backups
    // Store all backuped world in one zip? (true/false)
    // If false every worlds backup is saved in one directory named in the format:

    After this just type in your server
    to reload the settings


    /backup starts a manuel Backup of your server. If you don't have permissions, everybody can run this command.
    /backup NAME starts a manuel Backup of your server. This backup is stored in backups/custom

    So far
    So Mel
  2. Offline


    The backup plugin seems to have broken in Bukkit 812 :(

    Doesn't seem to be backing up anymore - and I've had a problem with it not working before, and stopping the save level, meaning I lost the save before the last backup.

    No idea if your going to look into this due to the 812 being unofficial, but I just thought I'd tell you :)
  3. Offline


    This is interesting, because I'm running a server with the release 1.6.4 and have not the problems. But I didn't try the version with the bukkit sheduler fix. Thanks for the hint.
  4. Offline


    Jep, I think you wanted to store backups over a day but a day has 1440 minutes and not 1440 * 15 minutes ;) So set by default 96.

    Thanks! Have you a issue tracker? Then you won't forget issues (maybe).

  5. Offline


    Errors in OP:
    • "Supporting Permission"(because I dont't run Permission I don't need it, I am not sure whether this works)
    • Supporting manual backups (you can use an ingame command or on the console
  6. Offline


    Sorry, but you mixed the plugins. The error occurs in the Plugin "SimpleSave" and not in my plugin.
  7. Offline


    Which error? Mine/Ours? Because I have no plugin “SimpleSave” on my server.

  8. Offline


    @Fabian: Not yours , it refered to a post which does not exist anymore.
  9. Offline


    I will release a version for 1.5 and the current recommend build, because the new version of minecraft is too buggy, as I can tolerate. I hope, that Mojang will fix most bugs and learn from it.
    So you can expect the next release this week, I will try to eliminate the bugs and will test it.
    If you can not wait, you can download the source and build it, but this is development status and have minor bugs and debugging information.
  10. Offline


    I've requested a commit pull fixing the FileNotFoundException error, please have a look at it.
  11. Offline


    Just wanted to thank the dev for this plugin! It just saved my server from worlds that got corrupted by a computer crash during a tectonicus run.

  12. Offline


    I think we needn't this little change, because the Exception FileNotFoundExceptions inherites from the Parentclass IOException. So if we catch IOExcetion, we also catch every FileNotFoundException.
  13. Offline


    Yes, but catching that error allows you to block the filenotfound error that people constantly get, however is not a real problem. If you catch IOException, your printing the stacktrack, and that can clog up logs.
  14. Offline


    Is there any chance we can get an option to specify a path to where the backups will go? instead of just backup/ in the minecraft server directory?
  15. Offline


    Hmmm, my guess would be to read the last two pages. Could be helpful:
  16. Offline


    I'd like to report that this (1.5) is working on 818 with a manual backup. I've yet to see an automatic backup.
  17. Offline


    I can confirm an automatic backup working on 818 :)
  18. Offline


    Recommended Build: 818 (MC: 1.6.6) is out.

    Will test with the Backup 1.5.

    Thanks for your work !

  19. Offline


    Did you even read the two posts above yours?


    Okay I got following error on stoping server:
    2011-06-01 18:34:25 [INFO] java.nio.channels.ClosedByInterruptException
    2011-06-01 18:34:25 [INFO]      at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:201)
    2011-06-01 18:34:25 [INFO]      at sun.nio.ch.FileChannelImpl.position(FileChannelImpl.java:313)
    2011-06-01 18:34:25 [INFO]      at sun.nio.ch.FileChannelImpl.transferFromFileChannel(FileChannelImpl.java:581)
    2011-06-01 18:34:25 [INFO]      at sun.nio.ch.FileChannelImpl.transferFrom(FileChannelImpl.java:641)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.doCopyFile(FileUtils.java:298)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.doCopyDirectory(FileUtils.java:264)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.doCopyDirectory(FileUtils.java:262)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.copyDirectory(FileUtils.java:230)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.copyDirectory(FileUtils.java:156)
    2011-06-01 18:34:25 [INFO]      at io.FileUtils.copyDirectory(FileUtils.java:125)
    2011-06-01 18:34:25 [INFO]      at threading.BackupTask.backup(BackupTask.java:74)
    2011-06-01 18:34:25 [INFO]      at threading.BackupTask.run(BackupTask.java:57)
    2011-06-01 18:34:25 [INFO]      at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-06-01 18:34:25 [INFO]      at java.lang.Thread.run(Thread.java:636)

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



    You should update your title before the bot shoves it into inactive.

    Great plugin! :)
  21. Offline


    Please update to 818, thank you.
  22. Offline


    Can you read the posts five/six posts above you -.- ?

  23. Offline


    It works for me here. I'm running 818.

    Nice work there, it is an awesome plugin, realy needed when fools keep blowing up my maps :)
  24. Offline


    Hi guys,

    I'm glad to say you, that I've released version 1.6 :
    • Added option to control where the backups are getting stored
    • Fixed disabling broadcast messages
    • You can now use also the old save system, which is the same as before 1.5
    • Uses godsny's suggestion for the config file. Thanks !
    • Fixed bug deleting the custom dir when the maximum backup limit is hit!
    • Fixed bug stopping the complete backup if there is one file error!
    • Fixed bug not disabling the automatic backup when you set the BackupIntervall to -1
    Please update your config.ini by deleting/moving your old one and add the new lines from the new created one!
    Thanks to all people reporting you bugs and supporting this project by good suggestions. My future plans are:
    Fixing all bugs (I hate it, when people report bugs, because bugs musn't exist in a BACKUP plugin. Of course this isn't (in every case!) users fault, but my faults.
    Also I will implement a better way to control the config.ini , so the plugin adds missing lines and you can set properties while the server is running.
  25. Offline


    Link giving me a 404. :'(

    Edit: Link is working now. Thanks :)
  26. Offline


    i think that the download link is broken, 404 error :\
  27. Offline


    Ups, I forget to update the hyperlink. I'm sorry for this, but now it is fixed!
  28. Offline


    yeah! :D

    works perfectly with cb 818, mc version 1.6_6

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


    Thank you for this plugin! by far the best backup plugin around! Exactly what i needed
  30. Offline


    Don't want to tell this, but I still have a problem with automatic deleting old backups :oops: (original post).

    And have this error while using custom backup directory:
    00:56:07 [INFO] Starting backup...
    00:56:07 [INFO] Forcing save..
    00:56:07 [INFO] ConsoleCommandSender: Forcing save..
    00:56:08 [INFO] Save complete.
    00:56:08 [INFO] ConsoleCommandSender: Save complete.
    00:56:08 [INFO] Disabling level saving..
    00:56:08 [INFO] ConsoleCommandSender: Disabling level saving..
    00:56:08 [INFO] [BACKUP] Backup compression is disabled.
    00:56:08 [INFO] java.lang.ArrayIndexOutOfBoundsException: 14
    00:56:08 [INFO]         at threading.BackupTask.deleteOldBackups(BackupTask.java:155)
    00:56:08 [INFO]         at threading.BackupTask.backup(BackupTask.java:116)
    00:56:08 [INFO]         at threading.BackupTask.run(BackupTask.java:57)
    00:56:08 [INFO]         at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    00:56:08 [INFO]         at java.lang.Thread.run(Unknown Source)
    00:56:08 [INFO] Enabling level saving..
    00:56:08 [INFO] ConsoleCommandSender: Enabling level saving..
    00:56:08 [INFO] Finished!
    But backups are creating.
  31. Offline


    Does this plugin support colored text for the backup start and finish messages? I like to use light purple to signify that it is the server putting the text into chat -- But at the moment I can only use white with this plugin... :'(

Share This Page