This role installs and configures restic & auto-restic.
No previous requirements are required
There are 3 types of vars:
- Install vars
- Config vars
- Trigger vars
Only install vars are viable on it's default value. To configure restic_locations and backends, just follow yaml guidelines and autorestic docs (https://autorestic.vercel.app/). It should be the same definition (thanks to jinja2 templating in ansible)
Read carefully the deafult variables!
The trigger to launch an "autorestic check" needs the autorestic_generated_conf_path to be defined! This var is used to fetch the generated configuration file with the key to a local path where ansible is being executed. It needs the "autorestic_check" var set to true also.
- After the first time execution if autorestic check is run, it is a good idea to keep that file, since you can use it in other environment to restore backups
- Be careful when running this over the same host, there should be not problems, but you may find autorestic.yml being overwritten, to avoid this, the template generated by ansible should match the file on the host. (restic_location and restic_backends should not vary unless you want to)
- read the doccs on autorestic and restic site to understand how cron / forget policies work.
- Autorestic or restic does not seems able to make backup of single files, it needs a full folder in order to work properly, take that into account when configuring locations.
No dependencies to other roles
Just add it to the playbook as restic.role :)
If you want to run tests, the "tests" dir have a vagrant env configured.
BSD
AdSanz A.K.A Null0ps