DataSaver

DataSaver

DataSaver是一个我的世界服务端插件,以Paper API 1.21为基础,用于以一种离线的方式对所有已加载世界的所有玩家数据进行备份与恢复 Datasaver is a minecraft server plugin, based on Paper API 1.21, be used for backup and restore all the player data from all the loaded worlds via an offline way.

28 downloads 1 followers

DataSaver

  • 还在为玩家数据经常丢失而发愁、恼火吗?这里有一个插件解决了这个问题!
  • DataSaver,一个基于 Paper API 1.21 的Minecraft服务端插件,用于以离线的形式备份与恢复所有已加载世界的Minecraft官方定义玩家数据,其中包括:
  • playerdata/<UUID>.dat 玩家NBT数据
  • advancements/<UUID>.json 玩家进度和成就
  • stats/<UUID>.json 玩家统计

备份文件统一使用.datasaver格式,其本质上是一个ZIP压缩包,内含manifest.json清单与上述玩家数据文件

功能

  • 多世界支持:支持所有多世界插件(例如Multiverse-Core),归档内按worlds/<世界名>/分层,恢复时按世界还原
  • 每日定时备份:支持每天定时备份,该功能默认每日凌晨00:30备份所有数据,该功能配置可在config.yml中修改
  • 手动备份:使用/datasaver backup命令可以进行手动备份,真正执行备份前插件会自动执行save-all,从而保证快照的完整
  • 恢复备份:使用/datasaver restore <备份ID/文件名>,对世界文件夹中存储的玩家数据进行逐一恢复(值得注意的是,该插件并不会直接覆盖目前的所有玩家数据,其仅会覆盖快照中保存的数据,且会回滚所有已加载且在快照中存在的世界的玩家数据)
  • 备份列表:使用/datasaver list [页数],则会显示备份后的快照列表
  • 接受外来玩家数据:只要您的备份也是.datasaver格式,您可以把您的备份文件放入备份目录,在放入备份目录后,插件会自动校验并登记,若插件未识别到您的.datasaver文件,则可能是您的文件中manifest.json文件不完整或缺失,可以使用/datasaver verify <文件>进行手动校验
  • 防呆设计:在恢复备份前自动把当前的玩家数据另存至pre-restore-*目录,防止服务器在恢复备份的过程中突然停止
  • 自动清理:超过config.yml中backup.max-backups后自动删除最旧备份

命令与权限

命令 权限节点 默认群组 备注
/datasaver backup datasaver.backup op 备份当前玩家数据
/datasaver restore <备份ID/文件名> datasaver.restore op 回滚至特定备份文件中的玩家数据
/datasaver list [页数] datasaver.list default 列出目前所有存在的快照
/datasaver verify <文件名> datasaver.verify op 校验指定快照
/datasaver rescan datasaver.rescan op 重新扫描文件夹中的所有快照
/datasaver help - default 显示帮助信息

使用

  1. 将DataSaver.jar放入plugins/,重启服务器;
  2. 备份文件位于plugins/DataSaver/backups;

配置

backup-folder: "backups"      # 备份目录(插件数据文件夹内)
backup:
  enabled: true               # 是否启用每日定时备份
  time: "00:30"               # 每日备份时间(服务器本地时区)
  max-backups: 30             # 最多保留备份数(0 = 不限制)
  worlds: []                  # 要备份的世界文件夹名;留空 = 备份所有已加载世界
data-folders:                 # 官方玩家数据目录(一般无需修改)
  - "playerdata"
  - "advancements"
  - "stats"

开源许可协议

[GPL-3.0] - GNU General Public License v3.0

DataSaver

  • Tired of player data getting lost and corrupted? This plugin puts an end to it!
  • DataSaver is a Minecraft server plugin built on the Paper API 1.21, designed to back up and restore, in offline form, the official Minecraft player data of all loaded worlds, including:
  • playerdata/<UUID>.dat — player NBT data
  • advancements/<UUID>.json — player advancements and achievements
  • stats/<UUID>.json — player statistics

Backup files use the unified .datasaver format — essentially a ZIP archive containing a manifest.json manifest and the player data files listed above.

Features

  • Multi-world support: works with all multi-world plugins (e.g., Multiverse-Core). Archives are organized under worlds/<world-name>/ and restored per world.
  • Scheduled daily backups: supports scheduled daily backups. By default, all data is backed up at 00:30 every day; this can be changed in config.yml.
  • Manual backups: use /datasaver backup to back up manually. The plugin automatically runs save-all before the backup actually executes, guaranteeing a complete snapshot.
  • Restore backups: use /datasaver restore <backup ID/file name> to restore the player data stored in the world folders one by one. (Note: the plugin does not directly overwrite all current player data — it only overwrites the data present in the snapshot, and it rolls back player data for every loaded world that exists in the snapshot.)
  • Backup list: /datasaver list [page] displays the list of backup snapshots.
  • Accept external player data: as long as your backup is also in .datasaver format, you can drop it into the backup directory and the plugin will automatically validate and register it. If the plugin doesn't recognize your .datasaver file, the manifest.json inside it is probably incomplete or missing — use /datasaver verify <file> to validate it manually.
  • Foolproof design: before restoring a backup, the current player data is automatically saved to a pre-restore-* directory, so nothing is lost if the server stops unexpectedly mid-restore.
  • Automatic cleanup: when the number of backups exceeds backup.max-backups in config.yml, the oldest backups are deleted automatically.

Commands & Permissions

Command Permission node Default group Notes
/datasaver backup datasaver.backup op Back up the current player data
/datasaver restore <backup ID/file name> datasaver.restore op Roll back to the player data in a specific backup file
/datasaver list [page] datasaver.list default List all existing snapshots
/datasaver verify <file name> datasaver.verify op Validate a specific snapshot
/datasaver rescan datasaver.rescan op Rescan all snapshots in the folder
/datasaver help - default Show help information

Usage

  1. Put DataSaver.jar into plugins/ and restart the server;
  2. Backup files are stored in plugins/DataSaver/backups.

Configuration

backup-folder: "backups"      # Backup directory (inside the plugin data folder)
backup:
  enabled: true               # Whether scheduled daily backups are enabled
  time: "00:30"               # Daily backup time (server local timezone)
  max-backups: 30             # Maximum number of backups to keep (0 = unlimited)
  worlds: []                  # World folder names to back up; empty = back up all loaded worlds
data-folders:                 # Official player data directories (usually no need to modify)
  - "playerdata"
  - "advancements"
  - "stats"

License

[GPL-3.0] - GNU General Public License v3.0

No gallery available for this project.

Version Minecraft Loader Download

DataSaver 1.1.2

1.1.2

1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11
bukkit, folia, paper, purpur, spigot
Download