Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Latest commit

 

History

History
77 lines (54 loc) · 3.6 KB

README.en.md

File metadata and controls

77 lines (54 loc) · 3.6 KB

QuickBackup

Designer

README.md

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

Download by release(Recommended)

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(...)
Loading

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.

Installation by Lip

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:

  1. When no parameters are provided, using this command will immediately create an archive backup in your specified target folder.

  2. /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 from schedule.json upon startup, eliminating the need to add tasks every time you enter the server.
  3. /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.