Perform backup of server directory so that it can be rolled back without

rebuilding the whole thing from another ref
This commit is contained in:
Simon Pamies committed 2013-04-16 10:49:57 +02:00
1 parent a551869059
commit 6d2d3a3389
1 file changed
+8
+8
View File
@@ -89,6 +89,7 @@ fi
echo PROJECT_HOME is $PROJECT_HOME
echo SERVERS_HOME is $SERVERS_HOME
echo BRANCH is $active_branch
options=':gtocpm:n:l:'
while getopts $options option
@@ -266,6 +267,13 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
exit
fi
# secure current state so that it can be reused if something goes wrong
if [ -f "$ACDIR/backup-binaries.tar.gz" ]; then
rm -f $ACDIR/backup-binaries.tar.gz
fi
tar cvzf $ACDIR/backup-binaries.tar.gz $ACDIR/plugins $ACDIR/configuration
if [ ! -d "$ACDIR/plugins" ]; then
mkdir $ACDIR/plugins
fi