Borgmatic

出自 ArchWiki

borgmatic 是一个基于 Python 的 Borg backup 包装脚本,旨在简化和自动化备份。它的目标是为使用 borgbackup 创建备份提供一个易于使用且灵活的解决方案。

安装

安装 borgmatic 软件包。

配置

默认情况下,没有安装配置文件。要创建一个,您可以使用命令 borgmatic config generate 来生成一个

# borgmatic config generate
Generating a configuration file at: /etc/borgmatic/config.yaml
 
This includes all available configuration options with example values, the few
required options as indicated. Please edit the file to suit your needs. 
 
If you ever need help: https://torsion.org/borgmatic/#issues
 
summary:
Generate successful

borgmatic 的配置文件位于以下位置之一

  • /etc/borgmatic/config.yaml(或 /etc/borgmatic.d 中的 drop-ins)
  • ~/.config/borgmatic/config.yaml(或 ~/.config/borgmatic.d 中的 drop-ins)

配置文件允许您定义备份仓库、备份源、保留策略和其他参数。

用法

一旦您根据自己的喜好配置了 borgmatic,您可以使用以下命令运行它

# borgmatic --verbosity 2

这将使用您的配置文件中指定的设置启动备份过程。borgmatic 提供了各种选项和标志,您可以使用它们来自定义备份行为。

Borgmatic 还提供 systemd 系统和用户单元以及定时器。

参见