Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
71
Merge Requests
71
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
79b03abc
Commit
79b03abc
authored
Oct 21, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finalize duplicity recipe in order to have push and pull
parent
a88bf182
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
duplicity.py
slapos/recipe/duplicity.py
+17
-9
No files found.
slapos/recipe/duplicity.py
View file @
79b03abc
...
...
@@ -30,15 +30,23 @@ class Recipe(GenericBaseRecipe):
def
install
(
self
):
remote_url
=
self
.
options
[
'remote
_
backup'
]
backup_directory
=
self
.
options
[
'directory'
]
remote_url
=
self
.
options
[
'remote
-
backup'
]
backup_directory
=
self
.
options
[
'
local-
directory'
]
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'duplicity_binary'
],
'--no-encryption'
,
backup_directory
,
remote_url
]
)
return
[
wrapper
]
cmd
=
[
self
.
options
[
'duplicity-binary'
],]
options
=
[
'--no-encryption'
]
if
self
.
optionIsTrue
(
'recover'
,
False
):
# duplicity restore [options] remote backup
cmd
.
append
(
'restore'
)
cmd
.
extend
(
options
)
cmd
.
extend
([
remote_url
,
backup_directory
])
else
:
# duplicity [options] local remote
cmd
.
extend
(
options
)
cmd
.
extend
([
backup_directory
,
remote_url
])
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
cmd
)
return
[
wrapper
]
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