diff options
author | Keuin <[email protected]> | 2022-01-10 15:27:33 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-01-10 15:28:15 +0800 |
commit | 8c2b5be114dc8dbf87230ed815bad80989819318 (patch) | |
tree | 59e96ff9e7f6d6bdf0d78e1a803b4f7510051cb4 /README.md | |
parent | 5fcb215223908595bdf6afdd527a231094c3ccb4 (diff) |
Document how to configure automatic backup with external task scheduler.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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 <RCON port> -p <RCON password> "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) |