Skip to content
Snippets Groups Projects
Commit ed9d1046 authored by micah's avatar micah :speech_balloon:
Browse files

stop failing on all the trac backups if just one fails

parent b499255f
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,9 @@ version 0.9.6 -- unreleased ...@@ -52,6 +52,9 @@ version 0.9.6 -- unreleased
. Added more robust software RAID information capture by running mdadm . Added more robust software RAID information capture by running mdadm
-Q --detail /dev/md?* because some people may have empty mdadm.conf files -Q --detail /dev/md?* because some people may have empty mdadm.conf files
(Thanks to John Hallam). (Thanks to John Hallam).
trac:
. stop failing on all the trac backups if just one fails, this means
removing the temporary trac backup directories if they fail
version 0.9.5 -- December 2, 2007 version 0.9.5 -- December 2, 2007
backupninja changes backupninja changes
......
...@@ -9,7 +9,6 @@ getconf src /var/lib/trac ...@@ -9,7 +9,6 @@ getconf src /var/lib/trac
getconf dest /var/backups/trac getconf dest /var/backups/trac
getconf tmp /var/backups/trac.tmp getconf tmp /var/backups/trac.tmp
error=0
cd $src cd $src
for repo in `find . -name VERSION` for repo in `find . -name VERSION`
do do
...@@ -38,20 +37,15 @@ do ...@@ -38,20 +37,15 @@ do
fi fi
if [ $code != 0 ]; then if [ $code != 0 ]; then
error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo" error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
error=1
fi fi
done done
if [ $error -eq 1 ]; then
echo "Error: because of earlier errors, we are leaving trac backups in $tmp instead of $dest"
else
if [ -d $dest -a -d $tmp ]; then if [ -d $dest -a -d $tmp ]; then
rm -rf $dest rm -rf $dest
fi fi
if [ -d $tmp ]; then if [ -d $tmp ]; then
mv $tmp $dest mv $tmp $dest
fi fi
fi
exit 0 exit 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment