ansible-restic | Deploy restic backup program | Continuous Backup library
kandi X-RAY | ansible-restic Summary
kandi X-RAY | ansible-restic Summary
Deploys restic binary and cron jobs to trigger restic commands.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ansible-restic
ansible-restic Key Features
ansible-restic Examples and Code Snippets
Community Discussions
Trending Discussions on ansible-restic
QUESTION
tl;dr
Ansible's template module treats a template destination as a directory instead of as a file. What am I missing?
Situation:
I am using paulfantom's ansible-restic role in another role, named backups-role
. I am testing my role with a dummy playbook in a local lxc environment, which installs a database service and then uses ansible-restic to create a cron job to back it up. For testing purposes, the backup destination is a local restic repo: /var/backup/backups-test
. I am using only one restic_repo named backups-test
Wrong! the variable was named {{ ansible_hostname }}/{{ ansible_date_time.epoch }}
, evaluated to something equivalent to myhost.local/1551799877
. See the answer directly.
Problem
This ansible task with from a stable ansible role (ansible-restic):
ANSWER
Answered 2019-Mar-06 at 20:22I self-answer becase I solved it with the hints of @TheLastProject from github.com. See just asked:
What's the value of your restic_repos variable?
And it turned to be that the info I provided at the question was wrong. I was setting the variable with a slash /
in the middle of the name, still don't know why. Therefore, when ansible-restic
was trying to make sure that /etc/cron.d/{{ repo_name }}
existed, it was actually trying to check /etc/cron.d/myhost.local/1551799877
, which clearly didn't exist, and didn't create it because it only creates files, not intermediary parents.
So no magic and no bugs in Ansible!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ansible-restic
You can use ansible-restic like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page