Introduction
This plugin runs on a BDS server that utilizes levilamina/LiteloaderBDS. It helps you perform secure hot backups of your server, ensuring that your archives are never lost. Additionally, it provides a convenient scheduling system, eliminating the need for separate tools to manage timed executions.
Dependencies
This plugin relies on legacy-script-engine-nodejs. Before installing this plugin, please install legacy-script-engine-nodejs from: here.
Installation
For levilamina, simply extract the plugin's compressed package and place it in the plugin folder as shown below:
flowchart LR
A(BDS_Server) --> B1(levilamina.dll)
A --> B2(...)
A --> B3(plugins)
B3 --> C(QuickBackup)
C --> D1(manifest.json)
C --> D2(index.js)
C --> D3(...)
For LiteloaderBDS, change the plugin's file extension to .llplugin
and directly place it in the server's plugins
folder. After completing these steps, don't forget to restart the server.
lip install github.com/heyhey123-git/QuickBackup
Usage
This plugin registers the top-level command /backup
for quick and efficient backup task management. Let's explain how to use the commands:
-
When no parameters are provided, using this command will immediately create an archive backup in your specified target folder.
-
/backup [add] <cronExpression: string> <scheduleName: string>
add
: Enumerated option indicating the addition of a backup task.cronExpression
: Any valid cron expression specifying the execution time for the task. When the specified time arrives, an archive backup will be automatically created in your designated target folder.scheduleName
: The name of the task, used to differentiate between different tasks.- Example:
/backup add "0 0 12 * * ?" test
adds a backup task named "test" that executes daily at 12:00. The server will automatically read the task list fromschedule.json
upon startup, eliminating the need to add tasks every time you enter the server.
-
/backup [query|cancel] [actionName: string]
query
: Enumerated option for querying tasks.cancel
: Enumerated option for canceling tasks.actionName
: The name of the task to operate on.- When using
query
to retrieve tasks without specifying a task name, all tasks will be returned. - Similarly, when using
cancel
to cancel tasks without specifying a task name, all tasks will be canceled.
配置文件
After starting the server, a configuration file will be automatically generated at ./plugins/QuickBackup/config/config.json
(usually relative to the directory where the BDS server executable is located). Any modifications made to this file will require a server restart to take effect:
{
"language": "zh_CN", // Language. The same name as the json file in /lang
"BDSpath": "./worlds/Bedrock level", // Your BDS archive path.
"targetPath": "./backup/", // The target folder where you save backups
"maxRetainDays": 7, // Maximum number of days to retain backup archives
"TimeOutSecond": 300, // Abort backup if it exceeds the specified time. Unit: seconds
"backupType": "7z" // Compression format,. Supported: 7z,zip,tar
}
Note: Please refrain from adding comments in the JSON file, as it may cause reading failures.