https://github.com/mcseekeri/but
But it's just another file backup tool.
https://github.com/mcseekeri/but
Last synced: 5 months ago
JSON representation
But it's just another file backup tool.
- Host: GitHub
- URL: https://github.com/mcseekeri/but
- Owner: MCSeekeri
- License: other
- Created: 2024-07-11T12:03:29.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-07-25T04:47:12.000Z (10 months ago)
- Last Synced: 2024-07-25T15:48:59.926Z (10 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bit Until Trash
一个多目标文件夹定时备份工具。
## 使用
but 目前有两种版本。
- 使用 Rust 编写的二进制程序。
- 使用 bash 的脚本。### 二进制
打开 Actions 页面,下载最新发布的二进制文件。
### 脚本
复制 but.sh 到合适的地方,
```
chmod +x but.sh
./but.sh -h
```
请确保运行之前已经安装了 tar 和 zstd 软件包。
部分发行版需要手动安装 cronie 包。## 软件配置
### 配置文件示例
```toml
[settings]
interval = 300
filename = "%name%-%timestamp%"
compression = "zstd"[backup.Downloads]
from = "/home/mcseekeri/Downloads/"
dest = "./"[backup.Server]
from = "/opt/Server/config/"
dest = "./"
```
## 配置文件位置but 将依次在 `/etc/but.conf` `$HOME/.config/but.conf` 和 `./but.conf` 三个位置寻找配置文件,优先级从高到低。
### 作为系统服务运行
将 `but.service` 文件复制到 `/etc/systemd/system/` 目录,并执行以下命令:
```bash
systemctl daemon-reload
systemctl enable --now but
```配置文件假设 but 位于 `/usr/local/bin/but`,您可以修改 `ExecStart` 字段以匹配实际位置,也可以将 but 软链接到 `/usr/local/bin/` 目录。
> 如果启动出错,可以输入`systemctl status but`查看错误日志。
## 备份原理
限于技术原因,目前 but 不支持增量备份,每次备份都会是完整备份。
不过为了节约空间,当指定目录未发生变化时,but 不会重复备份。