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
Labels
Merge Requests
93
Merge Requests
93
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
8b05f8a4
Commit
8b05f8a4
authored
Oct 19, 2018
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent backup from running if previous backup didn't finish
parent
dec1eb15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
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
+1
-1
No files found.
software/backupserver/software.cfg
View file @
8b05f8a4
...
...
@@ -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 =
529058c54e873ab26f7920c868b23c50
md5sum =
460757843b287f5eba55806fa528456b
output = ${buildout:directory}/template-update-rss.sh.in
mode = 0644
...
...
software/backupserver/template-backup-script.sh.in
View file @
8b05f8a4
#!${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 @
8b05f8a4
...
...
@@ -8,7 +8,7 @@ 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`
$CAT $status | $PYTHON $STATUS2RSS "Backup status $NAME" "https://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/$NAME.rss" > $RSS_DIR/$NAME.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