Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SaltStack Formulas
borgbackup
Commits
7cff0917
Commit
7cff0917
authored
Sep 02, 2021
by
remy
Browse files
'%' character need to be escaped
parent
cf1f94e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/crons/json_check.cron
View file @
7cff0917
...
...
@@ -2,5 +2,5 @@
# random minute = {{ randommin }}
SHELL=/bin/bash
{% for borgserver, borgdata in salt['pillar.get']('borg:servers').items() %}{% if borgdata['pool'] in grains['pool'] %}
{{ randommin + loop.index }} 5 * * * root PATH=$PATH:/usr/bin:/usr/local/bin:/root/.local/bin BORG_PASSPHRASE="{{ borgdata['passphrase']|replace('%','\%') }}" borg list --json {{ borgdata['borguser'] }}@{{ borgserver }}:{{ borgdata['repo'] }}/{{ grains['id'] }} > /var/log/borg/`date +"%Y%m%d"`.json
{{ randommin + loop.index }} 5 * * * root PATH=$PATH:/usr/bin:/usr/local/bin:/root/.local/bin BORG_PASSPHRASE="{{ borgdata['passphrase']|replace('%','\%') }}" borg list --json {{ borgdata['borguser'] }}@{{ borgserver }}:{{ borgdata['repo'] }}/{{ grains['id'] }} > /var/log/borg/`date +"
\
%Y
\
%m
\
%d"`.json
{% endif %}{% endfor -%}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment