[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

    Cognito guy

    I'm not sure if this has something to do with this plugin, but I thought it might, because this has something to do with saving. Sometimes when players build something and after that they walk away or log off, it's goes back to the way it was before they changed something, and if they rebuild they same thing happens! It only works if they rebuild and I restart the server immediately after that.

    Do you think this has something to do with the plugin?
  3. Offline


    No, ololo.
    Try a /save-all inb4 restarting as you're basically restarting an unsaved world - causing rollbacks.
  4. Offline


    This plugin is no longer functioning as it should... It is not deleting old backups...
  5. Offline


    Someone should takeover this till he's back.
  6. Offline


    Sorry if this is common sense... but i was just wondering if there was a way to put the back ups in a separate folder... more specifically in a different internal hardrive.. Thanks so much!
  7. Offline


    Working perfectly for me thank you ! :)
  8. Offline


    Hello, a friend and I are providing a package to help former zMod users (a now obsolete server wrapper) by providing a prebuilt version of bukkit and plugins pre-configured. We wanted to know if there is a issue with us distributing your plugin and wanted to ask for your permission to do so.
  9. Offline


    Sure you can, I run my MC Server inside a RAM Drive, so putting backups on it is silly.
    Minecraft is in M:\ and I have the backups go to my Server's C drive. In the config just use a full path, for example this is what i use:

    BackupDir=c:\minecraft server\backups
  10. Offline


    Does this plugin save AND backup is what your saying? (I mean though it would only save when its going to back up aswell)
  11. Offline


    Is the developer still continuing this awesome plugin?
  12. Offline


    I sure hope so. Out of every plugin that I have running on my server, this is the most indispensable of them all. It has saved my butt so many times.
  13. Offline


    Same hehe
  14. Offline


    Love this pluggin. Been using for a while and it saved me already few server crashes.
    Hope you start supporting it again.
  15. Offline


    Is it a common thing for the backups not to delete? Just deleted 100+ back ups. My host was not impressed :p

    But i agree with others. This is the best back up plugin i've used and has saved me many a time
  16. Offline


    This is a wonderful plugin. So many amazing features. It was a real pain doing this by hand. Hope it stays updated.
  17. THANK YOU ! For this plugin! :p This has saved my map alot of times now ! :) It works perfectly ! Simple and smooth..!

  18. Offline

    The Zephyr Kid

    Hey. The plugin works good and has saved me from a few chunk errors :D Only thing i have to complain about is every time it makes a back up my computer freezes for about 1-2 min. Not a big problem but it makes the server go down and it is rather annoying. Do you know why this is happening? Thanks
  19. Offline


    Yey! works with build 1000 *smiles*
    PS: This is the greatest backup plugin I have ever used! *smiles again*
  20. Offline


    Please update!
  21. Offline


    @RugRats: Tip: Read the posts above yours -.-

    To the plugin itself: It is possible to define which directories it shouldn't backup? For example we have a 2 GB large dynmap map (the images) and I don't want to backup every 15 mins the dynmap files, as the the images are larger than the rest of the server files :D .

    AS1LV3RN1NJA likes this.
  22. Offline


    Does this Work With 1000 or 953?
  23. Offline


    works in 1000.
  24. Offline


    It works with 953 thats all i know now
    I dont use 1000 becuase somereason my permissions i did dont work :O and it was anoyin also i know non of the codin crap for the built in ones
  25. Offline


  26. Offline


    No no what I mean is update to the newest recommended version of craftbukkit jeeze. I know it works or I'd be posting an error -.-
  27. Offline


    Ehr? But it IS working on 1000. So no update needed. Or did you mean to update the post? Sorry but this wasn't clear.

  28. Offline


    with whitelist 2.7 , idont knw if this is ur problem or theirs. the backup cyculus gets interupted even if a player isnt on the whitelist and never joins.
  29. Offline


    Okay I changed the backup path, and I then get the ArrayIndexOutOfBound exception:
    15:42:52 [INFO] java.lang.ArrayIndexOutOfBoundsException: 53
    15:42:52 [INFO]         at threading.BackupTask.deleteOldBackups(BackupTask.java
    15:42:52 [INFO]         at threading.BackupTask.backup(BackupTask.java:116)
    15:42:52 [INFO]         at threading.BackupTask.run(BackupTask.java:57)
    15:42:52 [INFO]         at org.bukkit.craftbukkit.scheduler.CraftWorker.run(Craf
    15:42:52 [INFO]         at java.lang.Thread.run(Thread.java:662)
  30. Offline


    I have same problem here (not using compression, changed the name for the backup folders and MaximumBackups=24 in config.ini if that can give a clue), currently at 108 backups (my server is young and I was just building the starting town, would have been more if people were actually playing all day on it).

    I have lots of HDD space on that server but would be nice to know why it keeps so many backups.

    Edit: Just had a look at my log and to the source of this plugin, in the log I see it detect properly the folders to delete but it don't work (no error message).
    Looks like the code not working is in src/threading/BackupTask.java (line 188-190):
                    // this are the oldest backups, so delete them
                    for (File backupToDelete : backups)
    This won't work because File.delete() does not work on non-empty folders:
    Just in case, here is a static function that can deal with non-empty folders:
        // Deletes all files and subdirectories under dir.
        // Returns true if all deletions were successful.
        // If a deletion fails, the method stops attempting to delete and returns false.
        public static boolean deleteDir(File dir) {
            if (dir.isDirectory()) {
                String[] children = dir.list();
                for (int i=0; i<children.length; i++) {
                    boolean success = deleteDir(new File(dir, children[i]));
                    if (!success) {
                        return false;
            // The directory is now empty so delete it
            return dir.delete();
  31. Offline


    –°an you add in new version of plugin new function like restart in some time, example: every day in 15.00. Because i use plugin which restart my server every 2 hours, and your plugin don't work. Thx.

Share This Page