From 1818da69b11db548974612991569bc213e500f99 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 10 Jan 2022 15:27:33 +0800 Subject: Document how to configure automatic backup with external task scheduler. --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 7cd819b..dd1e41a 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,30 @@ do done ``` +## 2.3 Automatic Regular Backup + +Currently KBackup does not support automatic backup by itself. However, If application level scheduled tasks are available to you, such as *crontab* in Linux and *Task Scheduler* in Windows, you can use that to trigger backup tasks regularly. + +### 2.3.1 On Linux + +In order to run Minecraft command on your server as a Shell command, you need RCON client like [mcrcon](https://github.com/Tiiffi/mcrcon). You can get the binary executable from its homepage and put it into anywhere like `/usr/bin`. + +Let's assume you are under Linux, run `crontab -e` and append this line to the configuration: + +```shell +0 */6 * * * mcrcon -P -p "kb backup" +``` + +You can specify RCON port and password in `server.properties`. + +This will cause `cron` to run `kb backup` for every 6 hours. To make incremental backups, simply replace `kb backup` to `kb incbak`. + +The man page [crontab(5)](https://man7.org/linux/man-pages/man5/crontab.5.html) also contains many useful information about using cron. + +### 2.3.2 On Windows + +For Windows users, please refer to [tutorials available on Google](https://www.google.com/search?q=create+scheduled+task+in+windows) for creating scheduled tasks. Note that mcrcon is also available on Windows. + # 3. To-Do List - A more friendly help menu (colored command help menu) -- cgit v1.2.3