-
Notifications
You must be signed in to change notification settings - Fork 42
/
backend-sync.sh
13 lines (11 loc) · 979 Bytes
/
backend-sync.sh
1
2
3
4
5
6
7
8
9
10
11
12
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
MODELNAME=his
DEST_HOST=philip@demo.doublechaintech.com
# cd ~/githome/${MODELNAME}-biz-suite/ && rm -rf bizcore/WEB-INF/${MODELNAME}_core_src
# java -jar ~/githome/splitter.jar ${MODELNAME}
# cd ~/githome/${MODELNAME}-biz-suite/&& git pull --allow-unrelated-histories && cd ../
cd ~/githome/${MODELNAME}-biz-suite/bizcore&& gradle classes && cd ../../
cd ~/githome/${MODELNAME}-biz-suite/ && rsync -avz bizcore/* ${DEST_HOST}:~/resin-3.1.12/webapps/${MODELNAME}/
ssh ${DEST_HOST} "mysqldump -h127.0.0.1 -u root --password=0254891276 --skip-quick --skip-tz-utc --skip-dump-date --skip-set-charset --skip-quote-names --skip-comments ${MODELNAME} > backup/${MODELNAME}.$(date +%Y%m%dT%H%M%S).sql"
ssh ${DEST_HOST} "mysql -uroot -p0254891276 -h 127.0.0.1 < resin-3.1.12/webapps/${MODELNAME}/WEB-INF/${MODELNAME}_core_src/META-INF/${MODELNAME}_mysql.sql"