Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
slapos/recipe/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