HMCL-dev / HMCL-dev/HMCL

[Feature] 为实例(版本)添加备份快照功能

Open
#5,100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

概述 | Summary

为实例添加备份(快照)功能

原因 | Reason

方便整合包作者/想在已稳定的环境下添加/测试新东西 出现问题后 一键还原到之前备份(保存的快照)版本

详情 | Description

(废话)叙述一下 "快照" 和 "备份" 的区别(以下信息来源于网络 搜索引擎:bing)

备份和快照是两种重要的数据保护方法,它们在创建方式、用途和恢复速度等方面存在显著差异。

备份

定义:备份是对数据进行完整复制,生成与原始数据完全独立的副本。备份通常用于长期数据保护,确保即使主存储损坏,也能从备份中恢复数据。
特点:备份需要更多的存储空间,且备份和恢复过程通常耗费更多时间和带宽。备份可以是全量备份或增量备份,适合于灾难恢复和业务连续性计划。 [2]

快照

定义:快照是对某个时间点的服务器状态或存储卷的即时记录,类似于拍摄一张“照片”。快照通常采用“写时复制”(Copy-on-Write)技术,快速创建数据的逻辑副本。
特点:快照的创建速度非常快,通常只需几秒钟。它并不是完整的数据副本,而是记录了数据在某一时刻的状态和修改记录。快照适用于短时间内需要回滚数据的情况,例如在误删除文件或应用崩溃后实现快速恢复。 [2]

主要区别

创建方式:备份是完整复制,快照是时间点记录。
存储需求:备份需要更多存储空间,快照占用空间较少。
恢复速度:快照恢复速度快,备份恢复通常较慢。
独立性:备份是独立副本,快照依赖于原始数据,原数据损坏时快照无法独立恢复。 [2]

使用场景

备份:适合长期数据保护和灾难恢复,确保数据的持久性和完整性。
快照:适合快速恢复和测试开发场景,能够在短时间内恢复到某一状态,但不适合长期数据保护。 [2]

通过结合使用备份和快照,可以为数据提供更全面的保护策略,确保在不同情况下都能有效恢复数据。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name any files, tests, or entry points. Start by tracing how HMCL represents Minecraft instances and versions, then inspect existing persistence and restore-related functionality; done would require a defined way to create, retain, list, and restore instance snapshots.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.