From 4d8ff98ad89dbcc7d07e4e37812e80b27bb17c44 Mon Sep 17 00:00:00 2001 From: "M.Goldshteyn" Date: Thu, 12 Sep 2024 16:14:02 +0300 Subject: [PATCH] start --- migration.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration.sh b/migration.sh index f9d7071..878e3aa 100644 --- a/migration.sh +++ b/migration.sh @@ -32,10 +32,13 @@ PLATFORM_DIRS="conf,lib,opencv,webapp,scripts,SERVER_config.txt,bin/server," IFS=',' read -r -a array <<< "$PLATFORM_DIRS" for folder in "${array[@]}"; do - yes | sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT -o StrictHostKeyChecking=no" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/ + yes | sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT -o StrictHostKeyChecking=no" -avz --ignore-existing $SOURCE_PLATFORM_PATH/$folder $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/ done } + download_platform + + DB_BACKUP=$SOURCE_DB_NAME.migration.$DATE.sql echo "backup name:" $DB_BACKUP db_backup() {