Restoring config file overwrites the config file we just deployed

This commit is contained in:
flyingscorpio@clevo 2023-01-18 16:05:16 +01:00
parent e87a453e88
commit 5ead3d5701

View file

@ -72,7 +72,7 @@ do_restore() {
chmod 600 "$tar_file" # Backup has changed permissions, restore them here
echo "Extracting $tar_file..." && mkdir "$tar_dir" && tar xvzf "$tar_file" -C "$tar_dir" && echo " OK."
cd "$tar_dir" || exit 1
echo -n "Restoring $CONFIG_FILE..." && mv -f app.ini "$CONFIG_FILE" && echo " OK."
rm app.ini
echo -n "Restoring $DATA_DIR..." && rsync -avz --delete data/ "$DATA_DIR" && rm -rf data && echo " OK."
echo -n "Restoring $LOG_DIR..." && rsync -avz log/ "$LOG_DIR" && rm -rf log && echo " OK."
echo -n "Restoring $REPO_DIR..." && mkdir -p "$REPO_DIR" && rsync -avz --delete repos/ "$REPO_DIR" && rm -rf repos && echo " OK."