diff options
author | Keuin <[email protected]> | 2022-01-10 15:27:33 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-29 00:39:10 +0800 |
commit | 1818da69b11db548974612991569bc213e500f99 (patch) | |
tree | c42e051e8725cf6376d84c96bf3fe52ec93631c1 /README.md | |
parent | 046a4e0f3032cfab731ef4128ff8abf2ae93311c (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) |