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.
Version 0.5.5 is crashing the server too many times :
Even when it's not saving.
So I'll still use 0.4.8.4.
@DonRedhorse
oooh alright, sorry, you might want to write that to configuration here or something ;)
@Wondrej
see a little down below... max zip file for upload to dropbox looks like 150 to 180 MB :-(
@ltguide
What should I do, and what doas this mean?
11:55:57 [WARNING] [MineBackup] ./minebackup/world/2012-01-29_10-14-04.zip: file size exceeds maximum allowed by the API
@DonRedhorse
ah thanks for that "tilespath: ../../dynmap_web/tiles"
will try it soon
@ltguide
splitting it... sigh... perhaps you could implement FTP?
The idea of dropbox is cool but with 150 MB only.. if you split it you have problems afterwards restoring it (well kinda) but you would also need more space to pack the stuff...
hmm uncompressed uploads? so just copy the full directories into dropbox?
concerning messages, I use the default file
@XeonG8
you can point the tiles to a different directory..
tilespath: ../../dynmap_web/tiles
will put them in dynmap_web which resides in the folder where cb is.
you need to have allow-symlinks: true though
@ltguide
I got it figured now, just took some playing with the config settings and back now. I only wanted compress , cleanup and copy were just getting in the way ..though I probably will put copy on for more regular intervals. Hopefully doing '/backup now' has set the time I want on a specified 24h compress, I dunno why you don't allow that to also have an exact time like the dropbox,cleanup.
"Note that not only dropbox & cleanup accept an exact time. You can schedule a compress/copy for a specific time in the middle of the night if you'd like."
yeh that was a little confusing with those having exact times, and others like compress only being intervals, or just the same name like copy/save being used in different sections of the config as true/false.. and then some sections inheriting the interval times. default_actions: copy: true/false default_settings: copy-interval: save-interval: cleanup-time:
interval/time on the end of copy/save etc would have just made more sense to me right from the start.
Anyway its almost perfect now that I got it tweaked, I still wouldn't mind a way to have more command control though.
Also I don't see the point in having all the worlds in separate folders, and associated compressed files.. plus if you got a 'save' for worlds on etc then a folder within that aswel.... Would much rather have Minebackup to be the folder, where all compress files are dumped with world/plugin prefix infront them...and the copy folder for various worlds/plugins to be in that same prefix format aswel.
That way from an management ftp viewpoint/ move >extract backup its easier to deal with than having to go into more sub folders. Or selecting the zip files for download then having to go into each sub directory to.
Oh and a method for compressing everything into 1 file and have that dumped in the root, for easy extracting /download?
@XeonG8
now:plugins, etc is an interesting idea.
Note that not only dropbox & cleanup accept an exact time. You can schedule a compress/copy for a specific time in the middle of the night if you'd like.
The config can be as detailed as you need. Many people just need to set the default_actions's of copy or compress to true and they are done.
I tried to explain the way it works in the documentation. Ask for more detail/explanation on whatever you are uncertain about so that I can clear it up for everyone else too :0
Gave it a try, mainly because I really need something to quicker backups of the plugins folder without things like 'dynmap' tiles (why on earth that stuff defaults to saving tiles buried in a plugins folder instead of root is weird/annoyingly stupid).. but I noticed you excluded it in the config :) I added Towny exclude '- backup' myself :)
Problem is only one command '/backup now' its a bit weak, when you just want /backup now:plugins' .. really need something that gives users more control to backup/compress just the stuff they I want when they want, ignoring the config/reload (don't like the config much kinda confusing tbh), just want world saves on interval, but copy/compress manually when I choose via command like..
/backup now:world compress:false /backup now:world_nether compress:true
@DonRedhorse
What do your commands.COMMAND.broadcast look like?
The file size limit is a Dropbox limit. The only way around it is the split the zip file into pieces smaller than 150 or 180mb (They're dev section says 150 but their sdk says 180). Thoughts?
@Znerox
"dirty" is a flag for worlds so that the plugin knows that it should back them up even if no players are currently online. It is set when someone quits or teleports from the world.
How big is your entire server folder? Can you send me a copy? Very curious how it didn't work in 0.4.8.4 either.
@ltguide I think i found the problem. In the file "\plugins\MineBackup\persist.dat" there was this flag under "factions" "dirty:true". I couldn't find any documentation on this, what does it mean??
@Znerox
Are you map folders in the root of the server directory? (in the same folder with craftbukkit*.jar)
What output do you get from "/minebackup now"?
Also, try setting "compress: true" under default_actions just to see if anything changes.
@ltguide Yes, I had the exact same problem with the old version of the plugin (0.4.8.4?) After i updated it doesn't seem to backup "staff" either, only plugins.
@Znerox
I'm not sure. Your config looks good. Is the factions map folder all lowercase?
@ltguide
The problem is that "staff" is being backed up, while "factions" aren't
@Znerox
v0.5.4? It's hard to say without seeing your config. pastebin or pm me in
<<code>>
<</code>> tags.I have multiple worlds on my server, and I've set it up to backup 2 of them, neither are the main world. But for some reason it's only backing up one of them, and not the other.. What could be wrong?
@deleted_7554077
1) That file was unable to be read (the plugin had the file locked) so it couldn't be added to the backup.
2) Yeah. It tracks them so that I don't have to get a list of the backups for a world and find the oldest (or newest, for a dropbox upload). Now that you mention it, next time I release an update I'll have it not say anything if the file has already deleted.
@ltguide
So the new version is working quite good but have 2 questions :D
2012-01-22 10:52:23 [INFO] [MineBackup] All backup actions will start momentarily. (CONSOLE)
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config others\plugins
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config worlds\world
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config worlds\world_nether
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config worlds\world_the_end
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config worlds\creative
2012-01-22 10:52:28 [INFO] [MineBackup] - loading config worlds\survival
2012-01-22 10:52:28 [INFO] [MineBackup] * compressing plugins
2012-01-22 10:52:34 [INFO] [MineBackup] \ unable to read from: .\plugins\NoCheat\nocheat.log.lck
2012-01-22 10:52:34 [INFO] [MineBackup] \ done 5826.38ms
2012-01-22 10:52:34 [INFO] [MineBackup] * saving world
2012-01-22 10:52:34 [INFO] [MineBackup] | unloaded 0 chunks @ 28.22ms
2012-01-22 10:52:34 [INFO] [MineBackup] \ done 50.74ms
2012-01-22 10:52:34 [INFO] [MineBackup] * compressing world
2012-01-22 10:52:36 [INFO] [MineBackup] \ done 2562.26ms
2012-01-22 10:52:36 [INFO] [MineBackup] * deleting .\minebackup\world\01-19_14-10.zip
2012-01-22 10:52:36 [INFO] [MineBackup] \ done 0.21ms
2012-01-22 10:52:36 [INFO] [MineBackup] * saving world_nether
2012-01-22 10:52:36 [INFO] [MineBackup] | unloaded 0 chunks @ 11.44ms
2012-01-22 10:52:36 [INFO] [MineBackup] \ done 36.65ms
2012-01-22 10:52:36 [INFO] [MineBackup] * compressing world_nether
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 360.49ms
2012-01-22 10:52:37 [INFO] [MineBackup] * deleting .\minebackup\world_nether\01-19_14-10.zip
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 0.21ms
2012-01-22 10:52:37 [INFO] [MineBackup] * saving world_the_end
2012-01-22 10:52:37 [INFO] [MineBackup] | unloaded 0 chunks @ 9.02ms
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 26.04ms
2012-01-22 10:52:37 [INFO] [MineBackup] * compressing world_the_end
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 209.60ms
2012-01-22 10:52:37 [INFO] [MineBackup] * deleting .\minebackup\world_the_end\01-19_14-10.zip
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 0.22ms
2012-01-22 10:52:37 [INFO] [MineBackup] * saving creative
2012-01-22 10:52:37 [INFO] [MineBackup] | unloaded 0 chunks @ 22.70ms
2012-01-22 10:52:37 [INFO] [MineBackup] \ done 55.40ms
2012-01-22 10:52:37 [INFO] [MineBackup] * compressing creative
2012-01-22 10:52:42 [INFO] [MineBackup] \ done 4832.89ms
2012-01-22 10:52:42 [INFO] [MineBackup] * deleting .\minebackup\creative\01-19_15-23.zip
2012-01-22 10:52:42 [INFO] [MineBackup] \ done 0.22ms
2012-01-22 10:52:42 [INFO] [MineBackup] * saving survival
2012-01-22 10:52:42 [INFO] [MineBackup] | unloaded 0 chunks @ 26.96ms
2012-01-22 10:52:42 [INFO] [MineBackup] \ done 66.35ms
2012-01-22 10:52:42 [INFO] [MineBackup] * compressing survival
2012-01-22 10:52:42 [INFO] [MineBackup] \ done 284.06ms
2012-01-22 10:52:42 [INFO] [MineBackup] * deleting .\minebackup\survival\01-19_14-30.zip
2012-01-22 10:52:42 [INFO] [MineBackup] \ done 0.25ms
2012-01-22 10:52:42 [INFO] [MineBackup] All backup actions have completed.
Plugin was unable to compress a file.
2012-01-22 10:52:34 [INFO] [MineBackup] \ unable to read from: .\plugins\NoCheat\nocheat.log.lck
And why is the plugin saying this
2012-01-22 10:52:42 [INFO] [MineBackup] * deleting .\minebackup\survival\01-19_14-30.zip
when I have no previous backups in the folder? Is it keeping track of the previous backups and just deleting the entries?
Thanks