replace ossutil
This commit is contained in:
		
							parent
							
								
									9cd7597ae6
								
							
						
					
					
						commit
						7466b5d1cf
					
				@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user