[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


    @godsyn: fork a repo and pull a request xD and while you're at it .. use the Logger Class and redirect those messages into backup-YY-MM-DD.log file ^^ That would be an improvement ;)
  3. Offline



    Nice plugin you have here, but i have one problem :(

    When it save the world backup, dit it not create are new zip file, but it overwrite the old one.

    So right now i only have one zip file in my backup dir..

    How can i fix this??

    Here is my config file :)

  4. Offline


    I'm not a java developer, so I wouldn't be able to implement the variables I'm requesting to be made.
  5. Offline


    I've to apologize, but I don't understand what you mean.
    It doesn't create a zipped backup or does it ?
    Or does it overwrite the old one and when yes, what name has the backup? Because it would only overwrite the backup when the old backup and the new one has the same name, but this is prevented by using a timestamp with day,month,year , hour,minute and second.
    Are there more files than the zip in your /backup folder?

    Not the problem, I've implemented them in my development build. Thanks for the suggestions :)
  6. Offline


    And where are the backups after saving them?

    Edit: I've tried with and without zipping and it doesn't work on Debian Squeeze. (I already installed zip and unzip, too Oo)

    Edit: It creates a folder in craftbukkit main directory. I will try and get it working with zipping :D (Does it need a zip tool or is this a java action?)
  7. Offline


    In your server directory you should have a folder named "backups". The plugin stores all backups in this folder. And no, you do not need a zipping tool, this is a java action.
  8. Offline

    Chris Lewis

    Is there something wrong with the timing? Dont get me wrong, i LOVE this plugin, replaced a broken BackupPlugin that is just horrible! However, even after changing the config to 45min intervals its still backing up at the defualt 15. Yes i have restarted/reloaded the server....
  9. Offline


    I have Permissions on my server and I'm the admin of it. I just installed this plugin and I can't use /backup. It's saying that I don't have the permission for it. In Permissions, I don't have restriction ('*'). I know that I can simply add it to my permissions, but it should be added by default. Besides that, good work !
  10. Offline


    Sorry m8 bad! My english sucks... I get it to work.. Reinstalled the hole plugin at rebooted the server..

    So all is fine now..
  11. Offline


    How would you compare your plugin to BackupPlugin 0.8.8 ? I'm Thinking about switching due to wanting to go to a multi world server. And did I see a post somewhere that said your naming convention will work with the /snap /restore funtion of WorldEdit?
  12. Offline

    Spike Padley

    This plugin is literally gold (or diamond), will it be compatible with 1.5_02 servers when craftbukkit for 1.5_02 is properly released?
  13. Offline


    This freezes the server and everyone times out :/
  14. Offline


    BackupPlugin was the first plugin I've used after I changed from SimpleServer to Bukkit. It was nearly the same as mine, but with one difference:
    (Maybe this is solved in a newer version)
    The current status of the world was not saved before the backup starts.
    This was also the reason why I've started this plugin ^^

    But I don't know, what you mean with
    And did I see a post somewhere that said your naming convention will work with the /snap /restore funtion of WorldEdit?
    Maybe, but I haven't done this at will ^^

    Yes, it works fine with the current development build (loaded from git and compiled on my own pc)

    What is your config? Are there any information in the log?
  15. Offline



    Thank you very much, you plugin is just excellent. It works great with Build 684.

    Between, I just had an error, I think that I stopped the MC server while a backup was being.

    I copy the log : http://paste2.org/p/1381956

    And I have a suggestion for your plugin,

    Can you add an option in your plugin to do a "backup of backup".

    I'm talking about a backup rotation scheme like the GFS backup system (see http://en.wikipedia.org/wiki/Backup_rotation_scheme#Grandfather-father-son_backup)

    For example, every x backups, copy the xth in an other folder or every x time (BackupIntervall + max backups (MaximumBackups).

    Like that for exemple you can have a daily backup + the normal backup strategy. Maximum security for minimum storage place.


  16. Offline


    2011-04-24 20:00:22 [INFO] ConsoleCommandSender: Forcing save..
    2011-04-24 20:00:22 [INFO] Saving chunks
    2011-04-24 20:00:22 [INFO] Save complete.
    2011-04-24 20:00:22 [INFO] ConsoleCommandSender: Save complete.
    2011-04-24 20:00:22 [INFO] Disabling level saving..
    2011-04-24 20:00:22 [INFO] ConsoleCommandSender: Disabling level saving..
    2011-04-24 20:00:28 [INFO] Enabling level saving..
    2011-04-24 20:00:28 [INFO] ConsoleCommandSender: Enabling level saving..
    y is displays in the game?

    edit: the ConsoleCommandSender
  17. Offline

    Cognito guy

    This happpens since I've updated to 1.4a, when I backup (manual or automatic):


    I'm using craftbukkit build #717

    EDIT: I reinstalled everything and now it works fine again

    Just one more question: If you have only backup when players are online turned on, does it backup as soon as the first player enters the server again?

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


    When the LAST player leaves the server it will shedule a last backup after the normal time.
    You backup time is 30 minutes. The next backup will be in 23. The last player leaves the server.
    The last backup will be in 30 minutes, the regular backup in 23 is canceled.
    Lets say, after 3 hours a player joins the empty server.
    In the 3 hours, the server always shedule the backup, but skip it, when no one is on the server.
    So the player joins and the last try to backup was 10 minutes ago. So the next backup is in 20 minutes.
  19. Offline


    Hello, again me.

    I have a 2nd request. (1st just few posts above).

    I have players on my server (and me sometimes) who just connect to check if there is someone and if it's not, they disconnect.

    So could you, please, add a check if a player come less than 30sec, to not iniate a backup when leaving...

    Thank you !


  20. Offline


    Hi !
    I switch from backupplugin to your plugin because yours is easier, fuller and multi-worlds compatible. So I'm very happy of it. Thanks you.
    I'm going to upgrade my server to the latest Craftbukkit RB (733). Is your plugin compatible ? It seems to be. If it is case can you change the thread title please ?
  21. Offline


    Yes, it works with the RB 733 and I changed the title. Thanks for the hint.

    I will think about it, but maybe this will all end in a seperate plugin. Because this plugin idea was to keep it simple and I implement more and more features being to much for some one.
    I will implement this check too.
  22. Offline

    Edgard Mok


    Number of backup ?

  23. Offline


    number of backups
  24. Offline

    Edgard Mok

    Thank you.
  25. Offline


    can you please change the command to backup to /serverbackup
    as the normal command clashes with essentials and stops both working
  26. Offline


    it loads fine but when backup starts i get masive freze, linux, build 733 just downloaded. Fail to backup F**d 3 of my servers Thank You so much -.-
  27. Offline


    As I always reply to posts like you've posted:
    What is your config?
    Is in the log anything?
    Do you have other plugins like mine?
  28. Offline


    sorry got mad,
    // Given in minutes
    //When the maximum is hit, the oldest backup will deleted
    // Set it too true, so that only ops can run a manuell backup
    2011-04-26 21:36:57 [INFO] Starting minecraft server version Beta 1.5_02
    2011-04-26 21:36:57 [INFO] Loading properties
    2011-04-26 21:36:57 [INFO] Starting Minecraft server on
    2011-04-26 21:36:57 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    2011-04-26 21:36:57 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    2011-04-26 21:36:57 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    2011-04-26 21:36:58 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-700-gf3ae4c3-b733jnks (MC: 1.5_02)
    2011-04-26 21:36:58 [INFO] Preparing level "world"
    2011-04-26 21:36:58 [INFO] Preparing start region
    2011-04-26 21:36:58 [SEVERE] ebean.properties not found
    2011-04-26 21:36:58 [INFO] DataSourcePool [DataLog] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    2011-04-26 21:36:58 [INFO] DatabasePlatform name:DataLog platform:mysql
    2011-04-26 21:36:58 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    2011-04-26 21:36:58 [INFO] Entities enhanced[0] subclassed[1]
    2011-04-26 21:36:59 [INFO] PlayerCount version 1.3 is enabled!
    2011-04-26 21:36:59 [INFO] [DataLog] Version 0.2 enabled!
    2011-04-26 21:36:59 [INFO] Loading map 'org.dynmap.flat.FlatMap'...
    2011-04-26 21:36:59 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    2011-04-26 21:36:59 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    2011-04-26 21:36:59 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    2011-04-26 21:36:59 [INFO] Activated world 'world' in Dynmap.
    2011-04-26 21:36:59 [INFO] Loading map 'org.dynmap.flat.FlatMap'...
    2011-04-26 21:36:59 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    2011-04-26 21:36:59 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    2011-04-26 21:36:59 [INFO] Dynmap WebServer started on null:8123
    2011-04-26 21:36:59 [INFO] [AutoMessage] version [1.5] loaded
    2011-04-26 21:36:59 [INFO] [Prefixer] v1.7 has been enabled.
    2011-04-26 21:36:59 [INFO] Whitelist: Trying to load whitelist and settings...
    2011-04-26 21:36:59 [INFO] done.
    2011-04-26 21:36:59 [INFO] Whitelist version 2.7 is enabled!
    2011-04-26 21:36:59 [INFO] [AfkBooter] Permissions not detected, defaulting to OP permissions.
    2011-04-26 21:36:59 [INFO] [AfkBooter] Version 0.9 is loaded.
    2011-04-26 21:36:59 [INFO] [AfkBooter] Kick timeout 60 sec, exempt players: name1, name2, name3
    2011-04-26 21:36:59 [INFO] [VoxelSniper] Config loaded
    2011-04-26 21:36:59 [INFO] VoxelSniper version 4.616 is enabled! Snipe away.
    2011-04-26 21:36:59 [INFO] LoginMessage 0.6_2 enabled
    2011-04-26 21:36:59 [INFO] PlgSetspawn version 4.0 is enabled!
    2011-04-26 21:36:59 [INFO] [MultipleHomes] Settings Loaded!
    2011-04-26 21:36:59 [INFO] [MultipleHomes] MultipleHomes version 0.51 is enabled!
    2011-04-26 21:36:59 [INFO] NoFire version 1.1 is enabled!
    2011-04-26 21:36:59 [INFO] [Jail] Loaded 1 jail zones.
    2011-04-26 21:36:59 [INFO] [Jail] Loaded 6 prisoners.
    2011-04-26 21:36:59 [INFO] IPGet version 0.4 is enabled!
    2011-04-26 21:36:59 [INFO] SimpleGod version 1.3 is enabled!
    2011-04-26 21:36:59 [INFO] Loaded ExExplosions version
    2011-04-26 21:36:59 [INFO] Helios version 0.3 is enabled! Embrace the Sun!
    2011-04-26 21:36:59 [INFO] [Backup] Permission system not detected, defaulting to OP
    2011-04-26 21:36:59 [INFO] Backup v1.4a was sucessfully loaded!
    2011-04-26 21:36:59 [INFO] [ColorMe] v1.2 has been enabled.
    2011-04-26 21:36:59 [INFO] Lockette version 1.3.4 is being enabled!  Yay!
    2011-04-26 21:36:59 [INFO] Lockette: Detected craftbukkit build [733] ok.
    2011-04-26 21:36:59 [INFO] Lockette: Using ops file for admin permissions.
    2011-04-26 21:36:59 [INFO] Lockette: Ready to protect your containers.
    2011-04-26 21:36:59 [INFO] Done (0.150s)! For help, type "help" or "?"

    When i run backup command i get:
    2011-04-26 21:38:54 [INFO] null
    2011-04-26 21:38:54 [SEVERE] java.lang.NullPointerException
    2011-04-26 21:38:54 [SEVERE]     at org.bukkit.craftbukkit.TextWrapper.wrapText(TextWrapper.java:38)
    2011-04-26 21:38:54 [SEVERE]     at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.java:594)
    2011-04-26 21:38:54 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.java:81)
    2011-04-26 21:38:54 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.java:85)
    2011-04-26 21:38:54 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.broadcastMessage(CraftServer.java:164)
    2011-04-26 21:38:54 [SEVERE]     at backup.BackupTask.backup(BackupTask.java:89)
    2011-04-26 21:38:54 [SEVERE]     at backup.BackupTask.run(BackupTask.java:71)
    2011-04-26 21:38:54 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-26 21:38:54 [SEVERE]     at java.lang.Thread.run(Thread.java:636)
    Edit also tried without plugins didnt work not on windows and not on linux
  29. Offline


    I keep getting these type of error

    Here's my config:

  30. Offline


    Is it possible to disable Broadcast message ?
    Cause when i delete the two broadcast message lines in config.ini, i have this error :

    01:44:18 [INFO] null
    01:44:18 [SEVERE] java.lang.NullPointerException
    01:44:18 [SEVERE]       at org.bukkit.craftbukkit.TextWrapper.wrapText(TextWrapper.java:38)
    01:44:18 [SEVERE]       at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.java:594)
    01:44:18 [SEVERE]       at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.java:81)
    01:44:18 [SEVERE]       at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.java:85)
    01:44:18 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.broadcastMessage(CraftServer.java:164)
    01:44:18 [SEVERE]       at backup.BackupTask.backup(BackupTask.java:89)
    01:44:18 [SEVERE]       at backup.BackupTask.run(BackupTask.java:71)
    01:44:18 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    01:44:18 [SEVERE]       at java.lang.Thread.run(Thread.java:662)
    Thanks for your nice plugin :D
    Ben91 likes this.
  31. Offline


    I get this crap too. If I try to change anything in the Config it breaks the plugin.

Share This Page