From ef310895b62682b4c87487a532455738da7dbedd Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 8 Jan 2022 19:04:59 +0800 Subject: Update README. Separate different languages in different files. Declare project situation more clearly. Add command permission nodes list. --- README.md | 102 ++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 40 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 34658d7..b6802b8 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,96 @@ -# Depreciation Notice (废弃声明) +# 0. README in another language -**This project is DISCONTINUED. Only bug reporting issues will be accepted.** +| Language | File | +|--------------|------------------------------------| +| English (US) | [README.md](README.md) | +| 简体中文 | [README_zh_CN.md](README_zh_CN.md) | -**However, it is still a good choice for single-machine backup.** +# 1. Inactive Development Notice -I decide to discontinue my development in this project. There are some major reasons: +## TL;DR -1. As one of my toy projects, its code quality is not satisfying and refactoring takes too much effort. The git history is bad too. -2. The Mod is proven to be working well (at least the latest version on my server, with Minecraft 1.16.5) as a basic backup and rollback tool for the game. All important features for a backup Mod are implemented. -3. I need a tool which backs up the save to the filesystem on another computer, via network. +- I have no time to keep active development in this project. +- Only bug reporting issues will be accepted. +- So if you want some new features, just clone and work on the code. Note that this project is licensed under GPLv3. -To solve these problems, I'm working on a new backup and rollback tool for Minecraft, which is based on [rdiff-backup](https://github.com/rdiff-backup/rdiff-backup). +**Any PR is welcomed. Feel free to add your reasonable features, if you have written test cases for them.** -As a general incremental backup tool, it tends to be more solid and well-designed. Moreover, it is able to transfer backup files over network. -Thus, I believe it is a good start point to reimplement an incremental backup Mod for Minecraft. +## A longer version -However, this tool is still a good choice for any Minecraft server (from 1.14.4 to 1.17.1) who wants to back up its world locally. +I decided to discontinue my development in this project. There are some major reasons: -(in simplified Chinese) +1. As one of my toy projects, its code quality is not satisfying and refactoring takes too much effort. The git history + is bad too. +2. The Mod is proven to be working well (at least the latest version on my server, with Minecraft 1.16.5) as a basic + backup and rollback tool for the game. All important features for a backup Mod are implemented. +3. I need a tool which backs up the save to the filesystem on another computer, via network. -由于我想实现一个可以将存档备份到网络上另一台计算机上的备份Mod,而如果要给这个项目增加此功能且保证可靠,需要做大量的修改和测试,这个工作量是我无法承受的。 -因此,我打算废弃这个项目,开始基于[rdiff-backup](https://github.com/rdiff-backup/rdiff-backup)开发一个新的备份Mod。 +To solve these problems, I'm working on a new backup and rollback tool for Minecraft, which is based +on [rdiff-backup](https://github.com/rdiff-backup/rdiff-backup). -在新Mod完善之前,这个Mod仍会继续更新,不过只是在修复Bug方面。这个Mod已经持续开发了一年半,基本功能是十分可靠的,因此,如果你只是需要一个将存档 -备份到本地的Mod,那么这仍然是一个可靠的选择。 +As a general incremental backup tool, it tends to be more solid and well-designed. Moreover, it is able to transfer +backup files over network. Thus, I believe it is a good start point to reimplement an incremental backup Mod for +Minecraft. -# KBackup-Fabric +However, this tool is still a good choice for any Minecraft server (from 1.14.4 to 1.17.1) who wants to back up its +world locally. -A simple backup mod for **fabric** Minecraft server, which makes **normal `.zip` backup** of your world, or self-implemented **incremental backup**, with slower increasing disk usage. +# 2. Usages -一个简单的Fabric备份Mod,支持普通备份(将存档整体压缩为 `.zip` 文件,保存在 `backups` 目录下)和增量备份(按需保存到 `incremental` 目录下,并将目录树结构保存在 `backups` 目录下) +A server-only backup mod for **fabric** Minecraft server, which makes **normal `.zip` backup** of your world, or +self-implemented **incremental backup**, with slower increasing disk usage. -Supported Minecraft version: 1.14.4, 1.15.2, 1.16.4/1.16.5 +Supported Minecraft version: 1.14.4, 1.15.2, 1.16.4/1.16.5, 1.17.1, 1.18.1 [Fabric API](https://minecraft.curseforge.com/projects/fabric/files) is required! -## 1. Commands +## 2.1 Commands (In English) - **/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 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 \**: 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. +- **/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. -(In simplified Chinese, 简体中文版本) +Only OPs can make backups and restore by default. -- **/kb** or **/kb help**: 显示命令列表 -- **/kb list**: 显示所有已有的备份 -- **/kb backup \[backup_name\]**: 以给定名字创建一个新备份,缺省的名字是“noname” -- **/kb incbak \[backup_name\]**: 创建一个增量备份,保存在 `incremental` 目录下。 (增量备份会创建扩展名为`.kbi`的一个索引文件,该文件仍被保存在 `backups` 目录下,与`.zip`文件的保存位置相同) -- **/kb restore \**: 还原到指定的备份。该命令需要二次确认才会真正被执行 -- **/kb confirm**: 二次确认,一旦确认,等待确认的命令会立刻被执行。这个命令是不可逆的 -- **/kb delete**: 删除一个现有的备份 -- **/kb prev**: 显示并且选中最近的一个备份,执行这个命令后,可以直接使用 `/kb restore 1` 进行还原 +However, you can use permission management mods like [LuckPerms](https://luckperms.net/) to configure exactly what +permissions normal players can use. Permission nodes of each command are listed below: -## 2. Script for auto-restart after restoring +| 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 | -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 auto restart after restoring, an outer system-based script is required, i.e. a batch or a shell script. +## 2.2 Script for auto-restart after restoring -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`. +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 auto restart after restoring, an outer system-based script is required, i.e. a batch or +a shell script. -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. +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`. -### 2.1 Script for Windows +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. + +### 2.2.1 Script for Windows ```batch @echo off @@ -79,7 +102,7 @@ rem kbackup restore auto restart pause ``` -### 2.2 Script for Linux or U\*ix using shell (Not tested, I use Windows for the most time, test it on your own) +### 2.2.2 Script for Linux or U\*ix using shell (Not tested, I use Windows for the most time, test it on your own) ```shell #!/bin/sh @@ -91,8 +114,7 @@ do done ``` - -## 3. To-Do List: +# 3. To-Do List - A more friendly help menu (colored command help menu) - New version checker -- cgit v1.2.3