Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ansible
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
Ansible
Commits
79f30669
Commit
79f30669
authored
4 years ago
by
Maxime Bombar
Browse files
Options
Downloads
Patches
Plain Diff
[borgbackups] Initialize borg repository.
parent
2850679c
No related branches found
Branches containing commit
No related tags found
1 merge request
!121
Borgbackup
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/borgbackup-client/tasks/main.yml
+6
-0
6 additions, 0 deletions
roles/borgbackup-client/tasks/main.yml
roles/borgbackup-client/templates/borgmatic/config.yaml.j2
+6
-1
6 additions, 1 deletion
roles/borgbackup-client/templates/borgmatic/config.yaml.j2
with
12 additions
and
1 deletion
roles/borgbackup-client/tasks/main.yml
+
6
−
0
View file @
79f30669
...
@@ -41,6 +41,12 @@
...
@@ -41,6 +41,12 @@
owner
:
root
owner
:
root
group
:
root
group
:
root
-
name
:
Init borg repository
command
:
cmd
:
/usr/bin/borgmatic init -e repokey
register
:
borg_init
changed_when
:
'
"does
not
exist"
in
borg_init.stderr'
-
name
:
Deploy borg cron
-
name
:
Deploy borg cron
template
:
template
:
src
:
"
cron.d/borg.j2"
src
:
"
cron.d/borg.j2"
...
...
This diff is collapsed.
Click to expand it.
roles/borgbackup-client/templates/borgmatic/config.yaml.j2
+
6
−
1
View file @
79f30669
...
@@ -38,12 +38,17 @@ storage:
...
@@ -38,12 +38,17 @@ storage:
umask: 0077
umask: 0077
lock_wait: 5
lock_wait: 5
archive_name_format: '{hostname}-{now}'
archive_name_format: '{hostname}-{now}'
{% set extra_init = borg.extra_prune | default([]) %}
{% set extra_prune = borg.extra_prune | default([]) %}
{% set extra_prune = borg.extra_prune | default([]) %}
{% set extra_create = borg.extra_create | default([]) %}
{% set extra_create = borg.extra_create | default([]) %}
{% set extra_check = borg.extra_check | default([]) %}
{% set extra_check = borg.extra_check | default([]) %}
{% if extra_init or extra_prune or extra_create or extra_check %}
extra_borg_options:
extra_borg_options:
{% endif %}
{% if extra_init %}
# Extra command-line options to pass to "borg init".
# Extra command-line options to pass to "borg init".
init: --make-parent-dirs {% for cmd in borg.extra_init | default([]) %}--{{ cmd }} {% endfor %}
init: {% for cmd in extra_init %}--{{ cmd }} {% endfor %}
{% endif %}
{% if extra_prune %}
{% if extra_prune %}
# Extra command-line options to pass to "borg prune".
# Extra command-line options to pass to "borg prune".
prune: {% for cmd in extra_prune %}--{{ cmd }} {% endfor %}
prune: {% for cmd in extra_prune %}--{{ cmd }} {% endfor %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment