Restic Backup
Deploy a restic backup repository, consumed by every other service's
restic_backup/restic_restore tasks. Two backends are implemented:
Both backends are written for the same restic Ansible hosts group and read the same cs_restic_repos /
cs_restic_cluster_name variables from the same group_vars/all/restic_setup_repositories.yml:
only the backend-specific variables, server-side setup, and backup/restore module differ. See the
linked pages for those details.
The Restic | Setup Repository play currently imports only the SFTP backend
(tasks/restic_setup_repositories/sftp-main.yml), and every service's restic_backup.yml and
restic_restore.yml call the restic_backup_restore_sftp module. The S3 backend's task files and module
stay in the repository, but the play does not import s3-main.yml, and the MinIO client (mc) that the S3
setup runs is not installed while the Patch | Minio MC task is disabled in playbook.yml.
Ansible hosts group: restic
Variables: shared
| Option | Type | Description | Default |
|---|---|---|---|
cs_restic_repos | dict[str, Any] | List of the repositories. | {} |
cs_restic_cluster_name | string | Name of restic cluster instance. | {{ cs_cluster_name }} |
cs_restic_repos
cs_restic_repos:
repo-name-1: {}
repo-name-2: {}
Installation
Restic is installed on all hosts via tasks/patch/install_restic.yml (tag: patch_install_restic). See Restic Installation in the patching docs for the task behavior and the cs_restic_version / cs_restic_bin / cs_restic_checksum_map / cs_restic_download_url variables (defined in group_vars/all/patchservers.yml).
Tags
restic,restic_setup_repositories: Create restic repository for backup.restic_backup: Also selects this play (see above), together with every service's restic backup task,patch_install_restic, and thePatchplay's set-default-target and reboot tasks.
Deployment
uv sync --all-extras --all-packages --no-progress
uv --offline run --no-sync --no-progress ansible-galaxy install -r requirements.yml
uv --offline run --no-sync --no-progress ansible-playbook playbook.yml --tags restic