MineBackup
MineBackup - Automatically save and backup your server!
Features
- Numerous backup actions: Save (default); Copy and/or Compress. The copy action creates a copy of files in backup folder while the compress action creates a zip of files in backup folder. You do not need to enable both for compress to work.
- Numerous upload actions: Dropbox; FTP. These actions will upload the latest compressed version, so you will need to be using compression.
- Maintenance action: Cleanup. With this action enabled, old backups will only be deleted as scheduled (otherwise they will be deleted after a copy/compress action).
- Each action has a configurable interval. You can even set a specific time that an action should trigger (only once per day). Every action supports either method.
- You can either enable actions globally (default for all worlds) or enable/disable actions for specific worlds. Specific worlds can even have different time intervals for each action!
- Global or per world configurable amount of backups to be kept on disc. So a world that is rarely used can be compressed every few hours and set to have less copies retained.
- Global or per world configurable broadcast of backup status.
- Setting to enable an immediate backup on server restart/reload with configurable delay. With this disabled (default), scheduled actions will occur at their proper time, but if the server was stopped during that time, then it will run as soon as possible.
- Backup actions are staggered to try to prevent low-powered servers from getting overloaded. Instead of checking every world at one time and in order, a queue is checked once a minute to see if it needs to do a backup action.
- If no one has used the world since the last backup ("not dirty") then its actions are skipped.
- Able to backup plugins/other directories with a list of excluded paths (like dynmap's /tiles) and file types.
- Customizable messages. Everything sent to players is able to be translated or changed. Including broadcast groups.
- Configuration migration with a backup copy of the original configuration.
Caution
Does your server have a single-core processor or a low amount of memory (512mb and several plugins)?
Do NOT enable compression! Only enable copy.
Does your server operate over a typical home internet connection?
Do NOT enable dropbox or ftp!
Failure to understand this will almost certainly result in all of your players being disconnected.
Notes
[v0.5+] Due to changes to the old backup deletion code, the plugin will not automatically delete any v0.4 backups. You will need to manually delete them at an appropriate time.
[v5.9.2+] If you still have the old map format (world height 128) files in your world folders, it's going to yell at you on server startup. Once you have a backup of the world, delete level.dat_mcr and the *.mcr files in the region folder. They aren't needed after the conversion and double the size/time of the backup.
[v5.9.3+] Enable 'debug' in config.yml for a detailed list of the settings that are being used as each world/plugins is loaded. (Exact times are seconds from midnight, but stored as a negative number.)
Setup & Usage
Only save is enabled by default. You need to enable either 'copy' or 'compress'.
Download
MineBackup.jar (for auto-updaters)
Source
Default Config (created first start)
Default Strings (created first start)
Dropbox Linker (Google App Engine)
Credits
ThisIsAreku for the original MineBackup. This plugin has now been completely re-imagined and rewritten. The only thing untouched and unchanged is the name itself.
Hey,
Why is there no broadcast message like Backup startet and Backup endet like in the older Version? I would really like this funktion :) Can you add this again?
Or is it already there but I dont see it?
@Doctacosa
from what I figured out, if saving is set in minebackup, it replaces original save system. Set it to something around 10 minutes, it reduces lag caused by saving, and provides enough safety.
I've been trying to install this one, but it did more harm than good since I don't quite understand the various config options. Does MineBackup replace Minecraft's default saving mecanism? If so, that'd explain why we lost some hours of playtime yesterday.
What I'd like to do is save the world to disk often (so that a random crash or server restart won't cause losses), do a single local compressed backup, and push said compressed backup to Dropbox.
At this point, I've got the Dropbox account linked properly. What basic configuration options would I need to get the desired result?
Thanks for any help. I love the plugin's concept, and would really like to have it running properly!
@ltguide I added the line if (player.isOnline()) before player.saveData(); and it seems to have resolved the issue was encountering. Players are still saved on the scheduled interval and the NPC files are no longer being created.
I honestly can't configure this to save my life, i tried using save: true or save: 8h on worlds, and for copy and everything else but it doesn't seem to be saving at all. I've even added no worlds and just changed the world directory to my name but no luck. The old one worked like a treat apart from backups not deleting
I also get this lag, i'm on a quad-core, 4gb (for minecraft) 8gb total ram, my worlds are around 1gb across 4 worlds, i'm copying from an SSD (worlds and server) to a 5200rpm HDD (backups).
it takes something between 30 and 40 seconds to backup it.
i'm compressing the worlds files with level 0 compress (just for the zip)
i'm also copying plugins, not much there
@ltguide
It's a quad-core, 4GB of RAM. My world folders are big - 1GB across 5 worlds. Bananabackup is great, but it isn't being updated and has very few features. I love Minebackup (I used it before my server grew this large), but the lag crashes my server.
My worlddata is all on a 10,000 RPM drive, so these backups can take a long time (several minutes) to copy.
@ltguide I use the following plugins Bedtime, Citizens, Colors, DeathTpPlus, LWC, PermissionsBukkit-1.2, PickBoat, PorteCoulissante, simpleWeatherv0.2, Worldborder, WorldEdit, WorldGuard.
How did the last version (4.8.4) of Minebackup handle the save? I didn't have the issue until I upgraded to 5.5.
@crussell52 All possible actions for a world are in a queue. Once a minute the queue is checked to see if an action time has expired, so it'll do one action per minute. If the world is "dirty" (player quit from or teleported from) or players are currently using it when an action is performed for said world, all its actions will be added to the queue again (thus only backing up a world if it's used).
@game_stailer94 It sounds like a default_action is set without cancelling it on that specific world. I'd need to see your config for specifics.
@Mercerchief5 Normally you just leave the world folder set to . unless you have changed it in your bukkit.yml.
@11RJB How big are your world folders? I'm assuming your server is a single-core. bananabackup copies some files then sends the task to sleep. I can probably add this to MineBackup, but it would be an option.
@adrianthewriter Your welcome :)
@rodier Right now you can only set one specific time for an action. (copy: '10:00') for copy at 10am. Multiple specific times will be a pretty big change to the scheduler.
What you can do is set (copy: 12h)
every 12 hoursand edit persist.dat to set copy actions to the next start hour you want. Use epochconverter Human date to Timestamp and multiply by 1000.@Razoul_05 I'm not sure what to tell you on this one. I just tell the server to save the data for each player that is in a world. I wonder if world.getPlayers() gives different results than .getOnlinePlayers() and checking player.getWorld()==world.
Are you using MultiInv or any such plugin?
@DonRedhorse Thanks. I'll be looking at in a day or so. Busy Busy :(
ok, I implemented an FTP option and made a pull request for ltguide to make it available to you too.
It will probably be 0.5.6
Why FTP? Well Dropbox has a limit of around 150 MB Zip file upload.
I hope he accepts the pull... have fun...
When using this backup on my server with the Citizens plugin a character file (\world\players\name.dat) is created for each of the NPC's. Normally this is not a problem but some of the NPC's are named after real players which causes that player file to be replaced with with one having no inventory or XP. Each time the Save process runs these character files are created/replaced.
or how to influence when server start counting to backup? if I set 12 hours backups.. it start counting when server run?
it is possible to make copy: 10:00, 15:00, ..etc ? I want set copy to like 4 times per day.. but in my custom time, not every x hours. thanks
I installed this last night. I want to thank you for deciding to add dropbox support for this. It's nice to know my backups are backed up safe and sound on an external server without my having to do anything. This is what is missing from all the other backup plugins! What good is a backup if it is stored on the same (potentially) corrupted hard drive as your server files?
I love the options with this plugin, but it lags my server to hell when it backs up. Any idea how hard it might be to implement a scheduler like what bananabackup has? That has all but eliminated the lag resulting from backups for my server.
http://dev.bukkit.org/server-mods/bananabackup/
Just in case anyone runs into the following error:
The error: "java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty" is not caused by MineBackup, but rather your java instance not having proper CA certs installed (thus breaking SSL).
A full reinstall of java should fix this. If you are more technically inclined, simply replacing the CA store will fix it. In Linux, look for "jre/lib/security/cacerts" located under the jvm install folder. In my case, there was a broken symlink to /etc/ssl/certs/java/cacerts. I corrected the link and Dropbox uploading worked fine after.
When I try to designate where the all of the world folders are located, I put /minecraft_server since that's where they are but for some reason it can't find them. Help me!
I really Like your plugin, so ther is only one problem.
normaly the backups stop after the last backup with no player online, just one world won´t stop to backup
Status says "not scheduled" but after 15 min its starts saving and the scheduler starts to run down
screenshot: http://s7.directupload.net/images/user/120131/3ktkcncc.png
so could you please say how to fix this?
(sorrry for my bad English i´m from Germany)
@ltguide
First off, thanks for the awesome plugin!
I have questions regarding the way scheduling works, but I want to make sure I understand the basic scheduling flow before trying to ask them. Is this an accurate explanation of the way it works?
If there is an active countdown when the server is restarted, the remaining amount on the countdown is persisted. The countdown continues where it left off when the server is restarted.
Thanks!
Edit: Retracted previous comment until I can better understand how the scheduling works.