restic/restic

GitHub: restic/restic

一款用 Go 编写的快速、安全、高效的跨平台备份工具,支持加密、去重和多种云存储后端。

Stars: 32691 | Forks: 1731

[![Documentation](https://readthedocs.org/projects/restic/badge/?version=latest)](https://restic.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6266f57303192345.svg)](https://github.com/restic/restic/actions?query=workflow%3Atest) [![Go Report Card](https://goreportcard.com/badge/github.com/restic/restic)](https://goreportcard.com/report/github.com/restic/restic) # 介绍 restic 是一个快速、高效且安全的备份程序。它支持三大主流操作系统(Linux、macOS、Windows)以及一些较小的操作系统(FreeBSD、OpenBSD)。 有关详细的使用和安装说明,请查阅 [文档](https://restic.readthedocs.io/en/latest)。 您可以在我们的 [Discourse 论坛](https://forum.restic.net) 提问。 ## 快速开始 [安装](https://restic.readthedocs.io/en/latest/020_installation.html) restic 后,首先为您的备份创建一个仓库: ``` $ restic init --repo /tmp/backup enter password for new backend: enter password again: created restic backend 085b3c76b9 at /tmp/backup Please note that knowledge of your password is required to access the repository. Losing your password means that your data is irrecoverably lost. ``` 并添加一些数据: ``` $ restic --repo /tmp/backup backup ~/work enter password for repository: scan [/home/user/work] scanned 764 directories, 1816 files in 0:00 [0:29] 100.00% 54.732 MiB/s 1.582 GiB / 1.582 GiB 2580 / 2580 items 0 errors ETA 0:00 duration: 0:29, 54.47MiB/s snapshot 40dc1520 saved ``` 接下来,您可以使用 `restic restore` 恢复文件,或者使用 `restic mount` 通过 fuse 挂载仓库,并浏览先前快照中的文件。 欲了解更多选项,请查阅 [在线文档](https://restic.readthedocs.io/en/latest/)。 # 后端存储 在同一台机器上保存备份虽然不错,但这并非真正的备份策略。 因此,restic 原生支持以下后端来存储备份: - [本地目录](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#local) - [sftp 服务器(通过 SSH)](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#sftp) - [HTTP REST 服务器](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server) ([协议](https://restic.readthedocs.io/en/latest/100_references.html#rest-backend),[rest-server](https://github.com/restic/rest-server)) - [Amazon S3](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#amazon-s3)(来自 Amazon 或使用 [Minio](https://minio.io) 服务器) - [OpenStack Swift](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#openstack-swift) - [BackBlaze B2](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#backblaze-b2) - [Microsoft Azure Blob Storage](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#microsoft-azure-blob-storage) - [Google Cloud Storage](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#google-cloud-storage) - 以及通过 [rclone](https://rclone.org) [后端](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#other-services-via-rclone) 支持的许多其他服务 # 设计原则 Restic 是一个旨在正确进行备份的程序,其设计遵循以下原则: - **简单**:备份应该是一个轻松无阻的过程,否则您可能会想跳过它。Restic 应该易于配置和使用,这样在发生数据丢失时,您可以直接恢复数据。同样,恢复数据也不应复杂。 - **快速**:使用 restic 备份数据应仅受限于您的网络或硬盘带宽,以便您可以每天备份文件。如果备份太耗时,没人愿意去做。恢复备份应仅传输待恢复文件所需的数据,从而使此过程同样迅速。 - **可验证**:比备份更重要的是恢复,因此 restic 让您能够轻松验证所有数据是否可恢复。 - **安全**:Restic 使用加密技术来保证您数据的机密性和完整性。备份数据的存储位置被假定为不受信任的环境(例如系统管理员等其他人可以访问您备份的共享空间)。Restic 旨在保护您的数据免受此类攻击者的侵害。 - **高效**:随着数据的增长,额外的快照应仅存储实际的增量数据。此外,重复数据在真正写入存储后端之前应进行去重,以节省宝贵的备份空间。 # 可复现构建 从 0.6.1 版本开始,每个 restic 版本发布的二进制文件都是[可复现的](https://reproducible-builds.org/),这意味着您可以 从该版本的源代码复现出一个字节级相同的版本。有关如何执行此操作的说明包含在 [builder 仓库](https://github.com/restic/builder) 中。 ## 新闻 您可以在 Mastodon 上关注 restic 项目 [@resticbackup](https://fosstodon.org/@restic) 或订阅 [项目博客](https://restic.net/blog/)。 ## 许可证 Restic 根据 [BSD 2-Clause 许可证](https://opensource.org/licenses/BSD-2-Clause) 授权。您可以在 [`LICENSE`](LICENSE) 中找到完整文本。 ## 赞助 Google Cloud Storage 和 Microsoft Azure Blob Storage 的后端集成测试由 [AppsCode](https://appscode.com) 赞助! [![Sponsored by AppsCode](https://cdn.appscode.com/images/logo/appscode/ac-logo-color.png)](https://appscode.com)
标签:EVTX分析, FUSE挂载, Go语言, HTTP工具, ProjectDiscovery, Restic, 云存储, 加密存储, 增量备份, 备份工具, 安全备份, 对象存储, 开源, 快照, 数据保护, 数据去重, 数据备份, 数据恢复, 日志审计, 灾难恢复, 程序破解, 重复数据删除