Browse Source

folders

master
M.Goldshteyn 1 year ago
parent
commit
316cde7b70
  1. 8
      migration.sh

8
migration.sh

@ -57,7 +57,6 @@ send_backup @@ -57,7 +57,6 @@ send_backup
create_and_restore_db
change_config
evt_full_rsync(){
echo "send $SOURCE_EVT to the destination"
sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/
@ -73,9 +72,11 @@ evt_specific_dirs_rsync(){ @@ -73,9 +72,11 @@ evt_specific_dirs_rsync(){
IFS=',' read -r -a array <<< "$FOLDERS"
for folder in "${array[@]}"; do
rsync -avz "/path/to/root/$folder" user@remote_host:/remote/path/
#rsync -avz "$SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder" user@remote_host:/remote/path/
sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/
done
}
fonts_rsync(){
echo "send fonts to the destination"
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "mkdir -p $DESTINATION_PLATFORM_PATH/bin/storage/1/fonts/"
@ -90,6 +91,9 @@ fonts_rsync(){ @@ -90,6 +91,9 @@ fonts_rsync(){
evt_full_rsync
elif [[ "$EVT_COMMON" == 2 ]]; then
echo "Не скачиваю ничего из storage"
elif [[ "$EVT_COMMON" == 3 ]]; then
echo "Download specidied folders"
evt_specific_dirs_rsync
else echo "EVENT_COMMON value must be 0 or 1 or 2" && exit
fi

Loading…
Cancel
Save