diff --git a/checkService.sh b/checkService.sh index d1024c7..1008478 100755 --- a/checkService.sh +++ b/checkService.sh @@ -28,7 +28,7 @@ function uploadLog() echo "current user is ${USER}" echo "current log is " ${workPath}/${identify}.log journalctl -n $count -xe -${ctype} $identify | grep -wv " at " > ${workPath}/${identify}.log - cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log + ossutil cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/dbUpgrade.sh b/dbUpgrade.sh index cc39b2c..c44669a 100755 --- a/dbUpgrade.sh +++ b/dbUpgrade.sh @@ -51,7 +51,7 @@ function replaceAndExec(){ rm sqlOut.log cp $tempPath/$sqlFile . /usr/bin/mysql -u${dbUser} -p${dbPassword} -P${dbPort} -e "$(cat ${sqlFile})" | tee sqlOut.log - cp -f sqlOut.log oss://${ossPath}/${dbHost}/sqlOut.log + ossutil cp -f sqlOut.log oss://${ossPath}/${dbHost}/sqlOut.log } function uploadLog() { @@ -60,7 +60,7 @@ function uploadLog() count=$3 echo "current user is ${USER}" journalctl -n $count -xe -${ctype} $identify > ${tempPath}/${identify}.log - cp -f ${tempPath}/${identify}.log oss://${ossPath}/${dbHost}/${identify}.log + ossutil cp -f ${tempPath}/${identify}.log oss://${ossPath}/${dbHost}/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/frontEndUpgrade.sh b/frontEndUpgrade.sh index 16a130b..80777bb 100755 --- a/frontEndUpgrade.sh +++ b/frontEndUpgrade.sh @@ -28,7 +28,7 @@ function uploadLog() count=$3 echo "current user is ${USER}" journalctl -n $count -xe -${ctype} $identify > ${workPath}/${identify}.log - cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log + ossutil cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/ossUpgrade.sh b/ossUpgrade.sh index ea333f2..1014156 100755 --- a/ossUpgrade.sh +++ b/ossUpgrade.sh @@ -41,7 +41,7 @@ function compare(){ function downloadFromOss(){ cd $basePath echo "fileName: " $fileName - cp oss://${ossPath}${fileName} ${fileName}_tmp + ossutil cp -f oss://${ossPath}${fileName} ${fileName}_tmp rm $fileName mv ${fileName}_tmp $fileName ( stat oss://${ossPath}$fileName | head -n -2) > ${projectName}_oss.info