mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-06 20:33:54 +00:00
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:
1 parent
a551869059
commit
6d2d3a3389
1 file changed
+8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user