feat: add restic backup plan #11

Merged
jdelpilar merged 8 commits from 10-add-restic-backup-plan into main 2026-07-12 12:01:24 -07:00
Owner

Description

This PR adds in a new role to setup backup for all hosts via restic with an rclone backend.
Added new host_vars to all host for both rclone and restic settings. All secrets are saved via ansible-vault encrypted strings.
New role creates rclone.conf to correctly map remotes. This conf file uses client id and client secret for google cloud project to allow for faster api access and better security.

Related Issue

Closes #10

Testing Done

  • Ran ansible-lint aganist local copy to verify syntax
  • Ran new role against testing environment to verify functionality.
  • Verified created backup service runs via triggering manually
  • Verified systemd timers trigger correctly

Checklist

  • My code follows the project's style guidelines.
  • I have performed a self-review of my own code.
### Description This PR adds in a new role to setup backup for all hosts via restic with an rclone backend. Added new host_vars to all host for both rclone and restic settings. All secrets are saved via ansible-vault encrypted strings. New role creates `rclone.conf` to correctly map remotes. This conf file uses client id and client secret for google cloud project to allow for faster api access and better security. ### Related Issue Closes #10 ### Testing Done - [x] Ran `ansible-lint` aganist local copy to verify syntax - [x] Ran new role against testing environment to verify functionality. - [x] Verified created backup service runs via triggering manually - [x] Verified systemd timers trigger correctly ### Checklist - [x] My code follows the project's style guidelines. - [x] I have performed a self-review of my own code.
jdelpilar added 8 commits 2026-07-12 11:59:09 -07:00
Added new templates related to backup tasks

`rclone.conf.j2` - rclone.conf template to set up remotes for restic repos. these are setup specifically for gdrive with a private client id.

`restic-backup.service.j2` and `restic-prune.service.j2` are used to define daily backups and weekly prunes as systemd services respecfully.
These systemd timers are used to run the backup and prune services on a daily and weekly basis respecfully.
They are intended to be used for all hosts to keep them all on the same schedule.
These new tasks prep the system for handling backups via restic with rclone as a backend.
This is the standard layout for all systems at this time.
Added handlers to reload systemd when new services and timers are created via the backup role.
These new varibles cover rclone and restic settings.
feat: added new backup role
Johto Infrastructure Pipeline / Run Ansible Lint (push) Successful in 1m48s
Johto Infrastructure Pipeline / Deploy to Production (push) Has been skipped
e4d0c5e64a
added new backup role including tags to playbook.
This new role targets all hosts.
update: added backup role variables
Johto Infrastructure Pipeline / Run Ansible Lint (push) Successful in 1m48s
Johto Infrastructure Pipeline / Deploy to Production (push) Has been skipped
1aa2185917
added required variables for backup role
jdelpilar changed title from 10 add restic backup plan to feat: add restic backup plan 2026-07-12 12:00:34 -07:00
jdelpilar merged commit a0a75b413d into main 2026-07-12 12:01:24 -07:00
jdelpilar deleted branch 10-add-restic-backup-plan 2026-07-12 12:01:24 -07:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jdelpilar/johto-infra#11