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
Xiaowu Zhang
slapos
Commits
75954ea8
Commit
75954ea8
authored
Oct 19, 2018
by
Thomas Gambier
🚴🏼
Committed by
Romain Courteaud
Dec 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[backupserver] prevent backup from running if previous backup didn't finish
parent
ae8dd586
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
software/backupserver/software.cfg
software/backupserver/software.cfg
+3
-10
software/backupserver/template-backup-script.sh.in
software/backupserver/template-backup-script.sh.in
+6
-1
software/backupserver/template-update-rss.sh.in
software/backupserver/template-update-rss.sh.in
+2
-2
No files found.
software/backupserver/software.cfg
View file @
75954ea8
...
...
@@ -6,14 +6,11 @@ extends =
../../component/openssl/buildout.cfg
../../component/nginx/buildout.cfg
../../component/rdiff-backup/buildout.cfg
# ../../component/duplicity/buildout.cfg
# ../../component/git/buildout.cfg
# ../../component/subversion/buildout.cfg
../../component/rsync/buildout.cfg
../../component/openssh/buildout.cfg
../../component/grep/buildout.cfg
../../component/findutils/buildout.cfg
# ../../stack/flask
.cfg
../../component/util-linux/buildout
.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
...
...
@@ -21,15 +18,11 @@ parts =
extra-eggs
monitor-extra-eggs
rdiff-backup
# duplicity
dcron
logrotate
nginx
openssl
# git
# subversion
rsync
# flask-egg
template
template-pullrdiffbackup
template-backup-script
...
...
@@ -75,7 +68,7 @@ mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-backup-script.sh.in
md5sum =
9af5212c3195972ca4845601420ab7cd
md5sum =
19dbafa190803ecacb99c480195a5294
output = ${buildout:directory}/template-backup-script.sh.in
mode = 0644
...
...
@@ -103,7 +96,7 @@ mode = 0644
[template-update-rss-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-update-rss.sh.in
md5sum = b
73d8b950ddea3fe1843d612d24ddf19
md5sum = b
012c04133a18f8e3c0dae5983142c7f
output = ${buildout:directory}/template-update-rss.sh.in
mode = 0644
...
...
software/backupserver/template-backup-script.sh.in
View file @
75954ea8
#!${dash-output:dash}
# don't run if rdiff-backup is still running
# in that case, the promise will detect that previous rdiff backup took too long and report an error
${util-linux:location}/bin/flock --nb $${:status_log}.lock true || exit
export HOME=$${directory:home}
# Inform about beginning of backup
...
...
@@ -8,7 +12,8 @@ ${coreutils-output:echo} "Available only if backup succeed." > $${:statistic_log
# set -e
cd $${:datadirectory}
${rdiff-backup-output:rdiff-backup} \
${util-linux:location}/bin/flock $${:status_log}.lock \
${rdiff-backup-output:rdiff-backup} \
$${:exclude_string} \
--include='$${:include}' \
--exclude='**' \
...
...
software/backupserver/template-update-rss.sh.in
View file @
75954ea8
...
...
@@ -8,10 +8,10 @@ PYTHON=${buildout:directory}/bin/${extra-eggs:interpreter}
STATUS2RSS=${status2rss:output}
BASENAME=${coreutils-output:basename}
for status in $STATUS_DIR/*
for status in $STATUS_DIR/*
.txt
do
NAME=`$BASENAME $status`
$TAIL -n 1 $status | $PYTHON $STATUS2RSS "Backup status $NAME" "https://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/$NAME.rss" > $RSS_DIR/$NAME.rss
done
$TAIL -n 1 $STATUS_DIR/* | $PYTHON $STATUS2RSS "Full backup status $${:global_rss}" "https://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/$${:global_rss}" > $RSS_DIR/$${:global_rss}
$TAIL -n 1 $STATUS_DIR/*
.txt
| $PYTHON $STATUS2RSS "Full backup status $${:global_rss}" "https://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/$${:global_rss}" > $RSS_DIR/$${:global_rss}
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