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
Jean-Paul Smets
slapos
Commits
4e89e334
Commit
4e89e334
authored
Sep 30, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resiliency: Only keep 10 increments of backup.
Also allow to bypass default value.
parent
53dc772e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
slapos/recipe/pbs.py
slapos/recipe/pbs.py
+5
-0
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+1
-1
stack/resilient/template-replicated.cfg.in
stack/resilient/template-replicated.cfg.in
+2
-1
No files found.
slapos/recipe/pbs.py
View file @
4e89e334
...
...
@@ -169,6 +169,9 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
# XXX: bang
mv %(local_directory)s %(local_directory)s.$(date +%%s)
fi
else
# Everything's okay, cleaning up...
$RDIFF_BACKUP --remove-older-than %(remove_backup_older_than)s --force %(local_directory)s
fi
"""
)
rdiff_wrapper_content
=
rdiff_wrapper_template
%
{
...
...
@@ -176,6 +179,8 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
'rdiffbackup_binary'
:
self
.
options
[
'rdiffbackup-binary'
],
'local_directory'
:
local_directory
,
'rdiffbackup_parameter'
:
'
\
\
\
n
'
.
join
(
rdiffbackup_parameter_list
),
# XXX: only 10 increments is not enough by default.
'remove_backup_older_than'
:
entry
.
get
(
'remove-backup-older-than'
,
'3B'
)
}
rdiff_wrapper
=
self
.
createFile
(
name
=
rdiff_wrapper_path
,
...
...
stack/resilient/buildout.cfg
View file @
4e89e334
...
...
@@ -61,7 +61,7 @@ mode = 0644
[template-replicated]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum =
e1ea317ad93c1bfaf0b82f5b0b4670c2
md5sum =
c762a625f65193bc8a570b4d56a0d08c
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
...
...
stack/resilient/template-replicated.cfg.in
View file @
4e89e334
...
...
@@ -171,7 +171,7 @@ sla-{{ key }} = {{ value }}
[request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-common
name = PBS {{id}} pulling from ${request-{{namebase}}:name}
config = url name type server-key on-notification notify notification-id title
config = url name type server-key on-notification notify notification-id title
remove-backup-older-than
config-url = ${request-{{namebase}}:connection-ssh-url}
config-type = pull
config-server-key = ${request-{{namebase}}:connection-ssh-public-key}
...
...
@@ -180,6 +180,7 @@ config-notify = ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}-pull
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}
config-title = Pulling from {{namebase}}
config-remove-backup-older-than = {{ slapparameter_dict.get('remove-backup-older-than', '3B') }}
slave = true
sla = instance_guid
sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
...
...
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