描述
适用于服务器的简易备份工具。支持按设定间隔自动备份,并提供可配置选项,如将备份压缩为 zip 文件、在无玩家在线时暂停自动备份等。
有关备份逻辑、压缩、基准测试、多线程等技术细节,请参阅 。
功能
- 支持按可配置的间隔进行自动备份
- 若无玩家在线则暂停备份以节省资源
- 异步执行备份操作,以最小化对游戏性能的影响
- 支持将备份压缩为 .zip 或 .tar.lz4 格式文件
- 可配置保留的备份数量上限,并设有防护机制确保备份不会占用过多磁盘空间
- 可通过命令手动触发备份:
/simplebackup start、/simplebackup zip、/simplebackup lz4、/simplebackup directory
- 手动备份权限可在配置文件中设置
- 备份文件默认存储在游戏目录下的 backup/ 文件夹中(与 mods/ 和 config/ 文件夹同级),也可配置为系统中的任意绝对路径
- 备份文件名格式为 YYYY-MM-DD_HH-MM-SS(.zip|.tar.lz4)(例如 ZIP 格式示例:backup/2022-05-04_05-04-13.zip,或目录格式示例:backup/2022-05-04_05-04-13/)
- 备份进行时将会向所有玩家广播消息。该消息内容可在配置文件中自定义,以支持多语言翻译并保持模组完全位于服务器端。此广播消息可选择禁用
- 此外,该模组仅需安装在服务器上即可!
如需帮助选择使用哪种备份格式,请参阅
配置文件
你可以在 config/simplebackup.json5 中的配置文件中调整所有功能。更多详细信息请查看配置文件文档:
注意:配置文件必须采用 UTF-8 编码。例如,如果你使用特殊键盘或文本编辑器输入用于广播消息的特殊字符,必须将其编码为 UTF-8。如果不确定,你可以将特殊字符放入类似 的工具中进行转换,然后在配置文件中使用生成的代码,这样就能被正确解析。
依赖项
本模组需要以下依赖:
需要搭建服务器?
Description
Simple Backup utility for servers. Automatic backups at intervals, with configurable options such as compression to zip file, pausing auto backups if no players are online, etc.
See for technical details on the backup logic, compression, benchmarks, multi-threading, etc.
Features
- Automatic backups at configurable intervals
- Pausing backups if no players are online to save resources
- Backups are done asynchronously to minimize impact on game performance during backups
- Compressing backup to .zip or .tar.lz4 file
- Configurations to limit number of backups to keep, and guards to ensure backups do not exceed the disk space
- Manual backups can be triggered with command
/simplebackup start, /simplebackup zip, /simplebackup lz4, /simplebackup directory
- Manual backup permissions can be configured in the config
- Backup is stored in the game directory under backup/ parallel to mods/ and config/ folders, or can be configured to any absolute path in the system
- Backup file format is YYYY-MM-DD_HH-MM-SS(.zip|.tar.lz4) (example: backup/2022-05-04_05-04-13.zip for ZIP format, or backup/2022-05-04_05-04-13/ for DIRECTORY format)
- Message will be broadcast to players when backup is in progress. The message is configured in the config to allow for language translations and keep the mod completely server-side. The messages can be disabled
- And yeah, the mod is only required on the server!
For help on choosing which backup format to use, see
Config
You can tune all the features in the config file at config/simplebackup.json5. Check out the config documentation at for more details
Note: the config file must be in UTF-8 format. For example, if you're using a special keyboard or text editor to type special characters for the broadcast messages, it must be encoded in UTF-8. If you aren't sure, you can put your special characters in a tool like , and use that in the config file, which will be able to be parsed correctly.
Dependencies
This mod requires:
Need a Server?
评论 0
登录后参与评分
还没有评论,来抢沙发吧