Backupping your server is one of the most important things to do as an owner. That's why I created the perfect tool for you, and for me.
This plugin is probably the easiest plugin to backup your server that exists!
Just by one command (/backup), you can save all your server (or just a part).
Then, with another command (/restore) you can restore an old backup!
With this plugin, you don't even need to launch craftbukkit to restore a backup!
You can launch the jar file with java like this:
“ java -jar PerfectBackup <backup_path> <server_path> [log] ”
With backup_path the path to your backup folder/zip,
server_path the path to your server's directory,
log a boolean (true/false) whether or not to show the debug log (default is true).
This will restore the backup of the folder/zip to your server, without even having to launch craftbukkit.
It can be used for Mini-Games where you want the server to reset automatically after each game.
You can also rename your backup files, and move them*. It will still work.
* If you move them, the in-game command /backups won't show them anymore.
This plugin adds three basic commands:

# Config File # The automatic backup system. # Players with permission PerfectBackup.warning will be warned on automatic backup. # interval: 2 h # Interval format: # <amount> <t/s/m/h/d> # t = Ticks, s = Seconds, m = Minutes, h = Hours, d = Days crontask: '0 0 4 * * *' # This would make it every day at 4 AM # CronTask format: # * * * * * * # | | | | | | # | | | | | +–––– Day of the Week (1-7) # | | | | +–––––– Month (1-12) # | | | +–––––––– Day of the Month (1-31) # | | +–––––––––– Hour (0-23) # | +–––––––––––– Minute (0-59) # +–––––––––––––– Second (0-59) # A few more examples... # crontask: '0 0 * * * *' This would make it every hour # crontask: '0 0 4 * * 7' This would make it every sunday at 4 AM # crontask: '0 0 4 1 * *' This would make it every first of the month at 4 AM # The format for backup names. # If two backups have the same name, it will append " (1)", " (2)" etc. backupformat: 'PerfectBackup {DATE}' # The format for dates. # MM = month, DD = Day, YYYY = Year, HH = 12h Hours, hh = 24h Hours, mm = Minutes, ss = Seconds, ms = Milliseconds, AM = AM/PM dateformat: 'MM-DD-YYYY hhh mmm sss' # e.g. 03-10-2016 11h 47m 24s # Whether the backups should be in a zip file or in a folder. zipbackups: true # The folder where to store the backups locally. localpath: 'plugins/PerfectBackup/backups' # The maximum backups stored. Will delete older backups when reached. (≤ 0 to disable) # Note: this will only work with local backups (fallbacks included). maxbackups: -1 # Whether or not the plugin should broadcast when automatic backups start/end. # If this is set to false, only players with the PerfectBackup.warning permission will see it. broadcast: false # Whether or not the plugin should broadcast when manual backups start/end. # If this is set to false, only players with the PerfectBackup.warning permission will see it. manualbroadcast: true # Whether or not you should see detailed information while creating a backup. debug: false # Whether or not the server should be restarted when a backup is restored. # This will run the command line "cd dirname" and "java -server -jar jarfile" # dirname being the directory to the server and jarfile the first .JAR file found in the server directory restorerestart: true # FTP settings and configuration. # Different modes (when to use FTP): # - NEVER (disable) # - FALLBACK (when an error occurs) # - LIMIT (move files when maxbackups is reached) # - FIRST (use ftp unless an error occurs) # - ALWAYS (only save to ftp, never use local) # - BOTH (save to both ftp and local) ftp: mode: NEVER host: 'localhost' port: 21 user: 'PerfectUser' pass: 'P3rf3c7P455w0rd' path: '~/PerfectBackups/' # What you want in the backup. backup: jarfile: false # The .jar file of your server (e.g. craftbukkit.jar) properties: true # The server.properties file ops: true # The ops.json file whitelist: false # The whitelist.json file spigotyml: true # If on spigot, the spigot.yml file bukkityml: true # The bukkit.yml file aliases: false # The commands.yml file eula: false # The eula.txt file metrics: false # The PluginMetrics folder logs: false # The logs folder, with all the zips (WARNING! This can make your backups way slower and very heavy!) pluginjars: true # The .jar files for the plugins pluginconfs: true # The data folder of each plugin worlds: # Use [] for no world, and - '*' for all the worlds. - 'world' - 'world_nether' - 'world_the_end' other: # Any other file you want to backup, using "!" before will prevent it from backupping (IMPORTANT! Use / for directories!) - 'plugins/PluginMetrics' - '!plugins/Essentials' - '!plugins/WorldEdit' - '!plugins/PerfectBackup/backups'
In this config (it's the default one), we can see:
This is the time between each automatic backup.
It must have the format number + space + unit.
The available units are t (ticks), s (seconds), m (minutes), h (hours) and d (days).
If you put an invalid value (e.g. none, or leaving it empty), it will disable automatic backups.
Default is "2 h" (2 hours).
Here are the 6 cron task components:
1/ Second (0-59)
2/ Minute (0-59)
3/ Hour (0-23)
4/ Day of the Month (1-31)
5/ Month (1-12)
6/ Day of the Week (1-7)
Default is "0 0 4 * * *" (every day at 4 AM).
You could also use for example:
crontask: '0 0 * * * *' (This would make it every hour)
crontask: '0 0 4 * * 7' (This would make it every sunday at 4 AM)
crontask: '0 0 4 1 * *' (This would make it every first of the month at 4 AM)
This is the format of the backup names when they are saved.
If several backups have the same name, the second will have "_1" added, the third "_2", etc.
Use {DATE} to insert the date, with the format set in dateformat.
Default is "PerfectBackup {DATE}".
This is the format of the date used for the backup format.
You can use for example:
24h: 'MM-DD-YYYY hhh mmm sss' (default)
AM/PM (12h): 'MM-DD-YYYY HHh mmm sss AM'
If this is set to true, the backups will be stored in zip files.
If set to false or anything else, they will be saved in normal folders.
Default is true.
The folder where to store the backups locally. Default is "plugins/PerfectBackup/backups".
The maximum number of backups stored locally.
Once it was reached, the oldest backups will be deleted.
Default is -1 (no limit).
If this is set to true, detailed information will be shown while creating a backup (useful for debugging).
If not, only important information will be shown (start, errors, result).
Default is false.
If this is set to true, the server will restart when a backup is restored.
This makes it easier, so that you don't have to restart your server by hand.
WARNING! This might bug the console on some hosting services.
This is done with two commands:
- cd <dirname> (dirname is your server's directory)
- java -server -jar <jarfilepath> (jarfilepath is the path to the first JAR file found in your server's directory)
Default is true, but it isn't always recommended to have this on.
This is where you configure the FTP backup storing.
This is where you configure what will be backed-up or not.
There are four permission nodes in this plugin, for the four commands:

If you want something added or changed, or if you have a question, tell me in the comments!
If you find a bug, please open a ticket describing the problem so that I can fix it!
This plugin works quite simply, but it has some complex function.
For example, zipping and unzipping a file took me quite some time to understand.
I also had to make the plugin a runnable JAR file, so it can be run to restore backups.
Inside my code, I have five classes:
This is just an explanation for you to know exactly what's going on on your server.
I do not allow you to copy this plugin, or any part of it.
If you do modify it, you will have absolutely no support, and no guaranty.

If you like my plugins, share them, download them, and consider donating with the button at the top-right of this page.
Thank you for all the support you give me, and I hope my plugins will continue to help you.
I try to keep them a maximum up to date, but some times I don't have time to do that immediately, so it can be a bit delayed.
But don't forget to update them, and get the latest features on your servers!
I don't have anything else to say here. But I think a Q&A would be appropriate, so there you go:
Q: Do you still work on updating this plugin ?
A: Unfortunately, no. Most of my public plugins aren't updated often as I don't have much time to spend because of my studies and my private projects.
But I do listen to ideas you propose and implement them as fast as possible (within a few hours for premium plugins).
Q: Is their any video so I can see how the plugin works ?
A: Yes, AbsintoJ has been kind enough to make a video.
Q: Does this work in 1.7 and 1.8 ?
A: It should, but since it is designed for 1.8, I didn't really test on 1.7.
Q: Why do I see [Metrics] in the console?
A: This is to get Statistics about my plugin, I use MetricsLite by Hidendra
Q: The auto restart on restore doesn't work, why?
A: This might be because of your hosting service, they could block the commands I use.
Or it might be because you have another JAR file that isn't your server JAR in the root of your server.
Q: Why "PerfectBackup"?
A: Because that's the perfect tool to help you create and restore backups, with just one command.
Off-topic Questions
Q: Why did you create this plugin? / What motivated you creating plugins?
A: I love creating stuff, and coding is my favorite activity, and since I love Minecraft too, I combined both and started making plugins.
For this plugin, yesterday, when I woke up, I felt I was bored. So I created that, and voila.
Q: How long do you take to code a plugin?
A: This one originally took me one day, but I maintain and work on them regularly.
Some can take me up to three or four days (and mini-games can be over a week).
If you have a question about this plugin or anything else: