#restic #loader #configuration #api

app restic_ez

此crate提供围绕restic的简单配置加载器和API

6个版本

0.3.0 2021年11月18日
0.1.5 2021年9月9日

#549 in 身份验证

BSD-2-Clause OR MIT

35KB
724

License BSD-2-Clause License MIT AppVeyor CI docs.rs crates.io Download numbers dependency status

restic-ez

欢迎使用restic-ez 🎉

restic-ez提供围绕restic的简单配置加载器和命令行API。

配置示例

[restic]
dirs = "/Development"
repo = "s3:https://<url to s3 bucket>"
safe_restore = true

[restic.flags]
backup = [
    "--exclude-caches",
    "--iexclude", "/Development/Code/Swift/*/.swiftpm",
    "--iexclude", "/Development/Code/Swift/*/.build"
]

[credentials.restic]
command = "set -euo pipefail; pass <path to password file> | sed -n 1p"

[credentials.s3]
id = { value = "<insert your s3 key id here>" }
secret = { command = "set -euo pipefail; pass <path to password file> | sed -n 2p" }

手册页面

Usage: restic-ez [verb]

Possible verbs are:
    create      Creates a new archive
    list        Lists the existing archives
    restore     Restores the latest archiv tagged with \"backup\"
    shell       Opens a shell session configured for easy manual restic invocation
    check       Checks the repository for consistency
    prune       Removes all unused chunks from the repository
    break-lock  Breaks a stale lock
    help        Displays this help

Specify the configuration using environment variables:
    RESTIC_EZ_CONFIG_TOML  Specifies the raw configuration toml string
    RESTIC_EZ_CONFIG       Specifies a custom path to a configuration file

Per default, restic-ez looks for the following config files:
    ./restic-ez
    ./restic-ez.conf
    ./restic-ez.toml
    ./.restic-ez
    ./.restic-ez.conf
    ./.restic-ez.toml

依赖项

~3.5–5MB
~107K SLoC