Description
KBackup-Fabric is a full-featured backup mod for Fabric community. Zip backup and incremental backup are supported.
Support MC 1.14~1.18.
1. Something important
This plugin requires Fabric API: https://www.curseforge.com/minecraft/mc-mods/fabric-api
It is a simple mod for my personal server, and it works on Minecraft 1.14.x/1.15.x/1.16.x/1.17.x/1.18.x
All updates will be published at https://github.com/keuin/KBackup-Fabric/releases.
The latest documentation is on GitHub: README.md (Engligh) and README_zh_CN.md (Simplified Chinese).
Updates in Curseforge is fewer and slower than in GitHub. If you always want the latest version, please check the GitHub repo!
2. Commands
- /kb or /kb help: show command list
- /kb list: show existing backups
- /kb backup [backup_name]: make a backup with given name or with the current system time by default
- /kb incbak [backup_name]: make an incremental backup which will be saved in
incremental
folder. (Incremental backup will create an index file which has an ext name of .kbi
, and it will be saved in backups
folder, which is the same with where .zip
resides)
- /kb restore <backup_name>: restore to a certain backup. This command needs a confirmation to execute.
- /kb confirm: confirm executing restore operation. The operation is irreversible.
- /kb delete: delete an existing backup.
- /kb prev: Find and select the most recent backup file. After executing this command, you can use
/kb restore 1
to restore to this backup.
Since v1.7.0, KBackup supports permission management. You can use LuckPerms to control which command the players can use. Only OPs can backup and restore by default.
Permission nodes:
Command |
Permission Required |
/kb |
kb.root |
/kb help |
kb.help |
/kb list |
kb.list |
/kb backup |
kb.backup |
/kb incbak |
kb.incbak |
/kb restore |
kb.restore |
/kb delete |
kb.delete |
/kb confirm |
kb.confirm |
/kb cancel |
kb.cancel |
/kb prev |
kb.prev |
3. How does KBackup work
.zip backup mode:
When backing up the worlds, this plugin compresses the whole world folder into a zip file, which will be stored in the "backups" folder.
When restoring, it stop the server, then decompress the elder zip pack to recover the previous world folder. Note: This plugin does not rely on any outer script. All you need to do is to restart your server manually after it is completely shut down automatically.
Incremental backup mode (only save modified files in the `world` folder since last backup)
KBackup adopts the algorithm which git (a version control software) uses. If you are interested, google how does git work.
Comparision between .zip backup and incremental backup
Both methods have their own advantages and disadvantages.
.zip backup:
- Contains everything about the world. Easy to migrate to another machine
- Takes up more disk space than incremental backup, in a single backup
- Backup and restoring are slower
Incremental backup:
- Takes up less disk space, in a single backup
- Very fast backup and restoration (depends on your disk speed, and especially CPU performance when making backup)
- Harder to migrate to another machine. You have to copy the entire incremental backup storage directory, which contains all your incremental backups
4. Auto restart the server after resotoring from a backup
Due to the nature of JVM: the Java language's running environment, there is no elegant way to restart Minecraft server in a server plugin. In order to achieve auto restarting, the outer system-based script is required, i.e the script is a batch or a shell script.
KBackup exit JVM with a special code 111
after restoring the level successfully. The startup script just check the exit code and restart Minecraft server if the code is 111
.
I will give examples for some popular operating systems. To use these scripts, you should replace your start.bat or start.sh script with given code lines.
The code formatting is rather bad, so please visit https://github.com/keuin/KBackup-Fabric/blob/master/README.md for the example script, or you can write it by yourself ;).
5. Compatibility with old versions of KBackup
- Due to a code refactor, 1.3.0-dev and later are not compatible with earlier versions!
- Incremental backup cannot be recognised by older versions which does not support incremental backup
- In one sencence, unless otherwise noted, newer KBackup are always compatible with older KBackup's backup.
If you have any questions about this plugin, please make an issue at this project's issue page, or just leave a comment below.
6. How to auto backup your server
For those who want to backup their worlds regularly, here is an external solution (since auto-backup has not been added into KBackup):
- Download script from https://github.com/keuin/RconJobs
- Enable RCON for your server and protect it with firewall
- Configure authentication info for RconJobs
- Save the example script in `tasks` folder with an arbitrary name
- Run `rconjobs.py` in background when your server starts up
If you want to change the backup time or frequency, please read this manual and modify the script. You have to learn a little python.
AD
Become Premium to remove Ads!
What means Verified?
-
Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
-
Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
-
Security: The mod should not contain any malicious code or attempts to steal personal information.
-
Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
-
Originality: The mod should be original and not a copy of someone else's work.
-
Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
-
Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
-
License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
-
Documentation: The mod should come with clear and detailed documentation on how to install and use it.
AD
Become Premium to remove Ads!
How to Install
Download Forge & Java
Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.
Prepare
Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.
Add Mods
Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder
Enjoy
You are now Ready. Re-start your Game and start Playing.