Giter Site home page Giter Site logo

paulfantom / ansible-restic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from donat-b/ansible-restic

22.0 22.0 26.0 174 KB

Deploy restic backup program

Home Page: https://galaxy.ansible.com/paulfantom/restic/

License: MIT License

Python 35.67% Shell 64.33%
ansible ansible-role backup restic

ansible-restic's People

Contributors

cryptozero avatar d-matt avatar donat-b avatar enricostano avatar hadret avatar jkirk avatar kaleng avatar kalos avatar killua-eu avatar madddi avatar ntimo avatar paulfantom avatar pieterlexis avatar rdemachkovych avatar rez0n avatar superq avatar thelastproject avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible-restic's Issues

"Deploy cron script" task treats β€œdest” as a directory instead of as a file and fails

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.

Restic installation directory chmod

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.

Repository initialization missing environment variables

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.

Request to publish a new tag for PR#61

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?

replace custom wrapper scripts with runrestic

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.

ansible-restic fails in check-mode (when /tmp/restic-0.9.6-SHA256SUMS is missing)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.