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
757fe617
Commit
757fe617
authored
Sep 11, 2014
by
Rafael Monnerat
Committed by
Cédric de Saint Martin
Jan 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: Accept custom exclude file to optimize backup.
parent
58c0b326
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+1
-1
software/slaprunner/template/runner-export.sh.jinja2
software/slaprunner/template/runner-export.sh.jinja2
+5
-2
No files found.
software/slaprunner/common.cfg
View file @
757fe617
...
...
@@ -67,7 +67,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/runner-export.sh.jinja2
download-only = true
md5sum =
0f290b46c0b89ff84aee5c10477e07c
a
md5sum =
8fd7246109783fd9267c037b079adb2
a
filename = runner-export.sh.jinja2
mode = 0644
...
...
software/slaprunner/template/runner-export.sh.jinja2
View file @
757fe617
...
...
@@ -7,15 +7,18 @@ sync_element () {
backup_path=$2
shift 2
element_list=$*
if [ -e {{ directory['srv'] }}/exporter.exclude ]; then
touch {{ directory['srv'] }}/exporter.exclude
fi
for element in $element_list
do
cd $path;
if [ -f $element ] || [ -d $element ]; then
{{ rsync_binary }} -rlptgov --safe-links --
delete
$element $backup_path;
{{ rsync_binary }} -rlptgov --safe-links --
exclude-from={{ directory['srv'] }}/exporter.exclude --delete --delete-excluded
$element $backup_path;
fi
done
}
sync_element {{ directory['srv'] }}/runner
{{ directory['backup'] }}/runner/ instance project
proxy.db
sync_element {{ directory['srv'] }}/runner
{{ directory['backup'] }}/runner/ instance project
proxy.db
# We sync .* appart
date +%s -u > {{ directory['etc'] }}/.resilient-timestamp
cp -r {{ directory['etc'] }}/.??* {{ directory['backup'] }}/etc/
...
...
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