Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backup-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible
roles
backup-client
Commits
c52a5e2d
Verified
Commit
c52a5e2d
authored
Jun 24, 2021
by
nd
Browse files
Options
Downloads
Patches
Plain Diff
add better remote repo support
parent
de9e0004
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
defaults/main.yml
+5
-4
5 additions, 4 deletions
defaults/main.yml
tasks/main.yml
+4
-4
4 additions, 4 deletions
tasks/main.yml
with
11 additions
and
8 deletions
README.md
+
2
−
0
View file @
c52a5e2d
...
...
@@ -36,6 +36,8 @@ backends:
url: '/var/backup-client/restic'
# repository type can be 'local' or 'sftp'
repo_type: 'local'
# additional repo keys to add. Format is "user: key"
additional_keys: {}
# Mode in which the backup is taken. One of the following:
#
...
...
This diff is collapsed.
Click to expand it.
defaults/main.yml
+
5
−
4
View file @
c52a5e2d
...
...
@@ -16,6 +16,7 @@ backups:
restic
:
url
:
/var/backup-client/restic
repo_type
:
local
additional_keys
:
{}
mode
:
vm-via-hypervisor
enabled
:
True
retention
:
...
...
@@ -36,9 +37,9 @@ backups:
enabled
:
False
create_storage_folder
:
True
exclude_files
:
'
/tmp'
:
true
'/var/tmp'
:
true
'/var/cache'
:
true
'/root/.ansible/'
:
true
'
/tmp
/*
'
:
true
'/var/tmp
/*
'
:
true
'/var/cache
/*
'
:
true
'/root/.ansible/
*
'
:
true
include_files
:
'
/'
:
true
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
4
−
4
View file @
c52a5e2d
...
...
@@ -154,7 +154,9 @@
state
:
"
{{
item
}}"
-
name
:
handle common restic based setup tasks
when
:
backup_backend == 'restic'
when
:
-
backup_backend == 'restic'
-
backup_executor
block
:
-
name
:
install backend tools (restic)
apt
:
...
...
@@ -202,11 +204,9 @@
group
:
root
mode
:
0700
-
name
:
create repo for restic
when
:
backups.backends.restic.repo_type == 'local'
shell
:
'
source
/etc/backup-client/restic.env;
restic
init'
shell
:
'
source
/etc/backup-client/restic.env;
restic
snapshots
>
/dev/null
||
restic
init'
args
:
executable
:
/bin/bash
creates
:
"
{{
backups.backends.restic.url
}}/config"
-
name
:
handle hypervisor mode
when
:
backups.mode == 'hypervisor-restic'
...
...
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