English | 简体中文
Profile-based restic wrapper, deployed with Ansible.
This repository is an Ansible collection (ak1ra_lab.restic_profile) that
installs and configures the restic-profile CLI on local or remote hosts:
- restic-profile CLI - reads a TOML config and runs
restic backup/forget/prunewith hooks and IM notifications. - restic_profile role - deploys the CLI, renders the TOML config, and
manages one systemd timer per profile (including user-level
systemd_scope: user). - restic_rest_server role - deploys a rest-server instance for remote backup storage.
You need Ansible on the control node - see Ansible toolchain for a uv-based setup. Clone the repo and install this collection with its dependencies into the project-local tree:
git clone https://github.com/ak1ra-lab/restic-profile.git
cd restic-profile
ansible-galaxy collection install --collections-path .ansible/collections -r requirements.yaml
ansible-galaxy collection install --force --collections-path .ansible/collections .Then pick an example from Ansible examples,
fill in your host_vars, and run the playbook. Building restic from source
(restic_profile_restic_install_source: go_build) also needs a go toolchain on
the control node.
Only needed to work on src/restic_profile or the roles and plugins:
uv sync --group dev
just lint
just typecheck
just test
ansible-lintTo develop ak1ra_lab.general alongside this repo, clone
ansible-collection-general next to this checkout and run
just ansible-collection-install - it installs this collection plus your local
../ansible-collection-general (skipping ansible.posix/community.general,
which come from your user-level Ansible).
https://ak1ra-lab.github.io/restic-profile/ - configuration lives in mkdocs.yml.