Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
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
Show 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):
...
@@ -169,6 +169,9 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
# XXX: bang
# XXX: bang
mv %(local_directory)s %(local_directory)s.$(date +%%s)
mv %(local_directory)s %(local_directory)s.$(date +%%s)
fi
fi
else
# Everything's okay, cleaning up...
$RDIFF_BACKUP --remove-older-than %(remove_backup_older_than)s --force %(local_directory)s
fi
fi
"""
)
"""
)
rdiff_wrapper_content
=
rdiff_wrapper_template
%
{
rdiff_wrapper_content
=
rdiff_wrapper_template
%
{
...
@@ -176,6 +179,8 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
...
@@ -176,6 +179,8 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
'rdiffbackup_binary'
:
self
.
options
[
'rdiffbackup-binary'
],
'rdiffbackup_binary'
:
self
.
options
[
'rdiffbackup-binary'
],
'local_directory'
:
local_directory
,
'local_directory'
:
local_directory
,
'rdiffbackup_parameter'
:
'
\
\
\
n
'
.
join
(
rdiffbackup_parameter_list
),
'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
(
rdiff_wrapper
=
self
.
createFile
(
name
=
rdiff_wrapper_path
,
name
=
rdiff_wrapper_path
,
...
...
stack/resilient/buildout.cfg
View file @
4e89e334
...
@@ -61,7 +61,7 @@ mode = 0644
...
@@ -61,7 +61,7 @@ mode = 0644
[template-replicated]
[template-replicated]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum =
e1ea317ad93c1bfaf0b82f5b0b4670c2
md5sum =
c762a625f65193bc8a570b4d56a0d08c
mode = 0644
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
destination = ${buildout:directory}/template-replicated.cfg.in
...
...
stack/resilient/template-replicated.cfg.in
View file @
4e89e334
...
@@ -171,7 +171,7 @@ sla-{{ key }} = {{ value }}
...
@@ -171,7 +171,7 @@ sla-{{ key }} = {{ value }}
[request-pull-backup-server-{{namebase}}-{{id}}]
[request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-common
<= request-pbs-common
name = PBS {{id}} pulling from ${request-{{namebase}}:name}
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-url = ${request-{{namebase}}:connection-ssh-url}
config-type = pull
config-type = pull
config-server-key = ${request-{{namebase}}:connection-ssh-public-key}
config-server-key = ${request-{{namebase}}:connection-ssh-public-key}
...
@@ -180,6 +180,7 @@ config-notify = ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}
...
@@ -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-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-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}
config-title = Pulling from {{namebase}}
config-title = Pulling from {{namebase}}
config-remove-backup-older-than = {{ slapparameter_dict.get('remove-backup-older-than', '3B') }}
slave = true
slave = true
sla = instance_guid
sla = instance_guid
sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}: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