paulfantom / ansible-restic Goto Github PK
View Code? Open in Web Editor NEWThis project forked from donat-b/ansible-restic
Deploy restic backup program
Home Page: https://galaxy.ansible.com/paulfantom/restic/
License: MIT License
This project forked from donat-b/ansible-restic
Deploy restic backup program
Home Page: https://galaxy.ansible.com/paulfantom/restic/
License: MIT License
Hi @paulfantom - We're wanting to take on the improvement in #61 (check if a repo needs initialization) but this hasn't been released in a tag. We'd very much appreciate it, if you would please make new tag/release so we can refer to that in our deployments?
I suspect this will be a "works for me", but maybe you can help me out. I have posted a question to stack overflow
What ansible-restic should do here is to deploy a cron script based on a template, with name restic-backups-test, inside directory /etc/cron.d/ . However, it looks like ansible interprets that the directory should be /etc/cron.d/restic-backups-test and the file name just the epoch timestamp like 1551799877
I'm afraid it has to do with my environment instead, but I don't know what could make ansible change this behaviour, and my playbook doesn't do black magic.
In configure.yml/Initialize restic repositories the environment variables needed to authenticate with, e.g., backblaze aren't set, so it fails with an error like "Fatal: create repository at b2:wttw-whatever:/wherever failed: Fatal: unable to open B2 backend: Account ID ($B2_ACCOUNT_ID) is empty".
I'm guessing it needs the remote_credentials passed in, much as they are in restic.cron.j2.
I've worked around it here, but I'm not quite fluent enough in ansible to do it the right way.
Just stumbled over this: if /tmp/restic-0.9.6-SHA256SUMS
is missing, check-mode fails:
% ansible-playbook -D -C site-backup01.yml
[...]
TASK [paulfantom.restic : Get checksum list from github]
changed: [backup01.example.com]
TASK [paulfantom.restic : Set checksum variable]
fatal: [backup01.example.com]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "file not found: /tmp/restic-0.9.6-SHA256SUMS"}
[...]
It would be nice if the role does not cause a change if a temporary file is missing and it certainly should not fail. Thank you.
Hi, thanks for this project.
The binary gets installed to /usr/local/bin, but the task named "Ensure restic installation directory exist" overwrites the folder's permissions, effectively disabling access to other binaries in that folder for regular users.
I checked Ansible's file module but it states that the directory is created only if it doesn't exist. I've found no option to let existing permissions stay intact.
This role shouldn't reinvent the wheel and implement custom scripts for various restic functionalities. There are already many projects providing a simple to use wrapper on restic and those could be used instead.
We could use runrestic
which is written in python3 and available via pip3 install runrestic
. Personally I like this one as it has clear configuration and includes instrumentation to push metrics to prometheus monitoring system.
This is only an idea, but implementing this should greatly simplify second day operations and reduce role maintenance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.