Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 1

$
0
0

scp parallel Linux script 

Please test before it use:

#!/bin/ksh
cnt=1
RHOST=srv245005
CCMD="ls /db/remote_backup_area"

for BackupFile in 'ssh -q oracle@${RHOST} ${CCMD}'; do
        echo "attempting to copy file: " $BackupFile
       
        #scp -pq $hostname:/db/remote_backup_area/$file /db/local_dump_area &
        (
      echo "starting $file `date`">/tmp/status/${file}.log
      scp -pq $hostname:/db/remote_backup_area/$file /db/local_dump_area 2>>/tmp/status/${file}.log
      echo "done $file `date`">>/tmp/status/${file}.log
    ) &
        cnt=$(( $cnt + 1 ))
        if [ cnt -eq 10 ] then
           wait
           cnt=1
        fi

done
wait
exit

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>