{"id":887,"date":"2013-02-12T14:22:04","date_gmt":"2013-02-12T14:22:04","guid":{"rendered":"http:\/\/kraftek.com\/blog\/?p=887"},"modified":"2013-02-12T14:22:04","modified_gmt":"2013-02-12T14:22:04","slug":"rsync-many-solaris-servers-non-os-filesystems-in-parallel","status":"publish","type":"post","link":"\/blog\/index.php\/rsync-many-solaris-servers-non-os-filesystems-in-parallel\/","title":{"rendered":"Rsync many solaris server&#8217;s non-OS filesystems in parallel"},"content":{"rendered":"<p>This one will run rsyncs in the background for each host it finds in hosts.txt, and save each host&#8217;s progress in a log.<\/p>\n<pre>#!\/bin\/ksh\nfor h in `cat hosts.txt`;do\n echo \"----------------------- $h\"\n (\n ssh $h df -k | egrep -v 'cdrom|^Filesystem|\/$|\/devices$|\/system\/contract$|\/proc$|\/etc\/mnttab$|\/etc\/svc\/volatile$|\/system\/object$|\/etc\/dfs\/sharetab$|\/dev\/fd$|\/tmp$|\/var$|\/var\/run$|\/dev\/vx\/dmp$|\/dev\/vx\/rdmp$|\/cores$|\/var\/crash$' | awk '{ print $NF }' | while read l;do\n mkdir -p \/space\/$h$l\n echo \"rsync --progress -zrtva $h:$l\/ \/space\/$h$l\/\"\n rsync --progress -zrtva $h:$l\/ \/space\/$h$l\/\n done\n ) 2&gt;&amp;1 &gt; ${h}.log &amp;\n done<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This one will run rsyncs in the background for each host it finds in hosts.txt, and save each host&#8217;s progress in a log. #!\/bin\/ksh for h in `cat hosts.txt`;do echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; $h&#8221; ( ssh $h df -k | egrep -v &#8216;cdrom|^Filesystem|\/$|\/devices$|\/system\/contract$|\/proc$|\/etc\/mnttab$|\/etc\/svc\/volatile$|\/system\/object$|\/etc\/dfs\/sharetab$|\/dev\/fd$|\/tmp$|\/var$|\/var\/run$|\/dev\/vx\/dmp$|\/dev\/vx\/rdmp$|\/cores$|\/var\/crash$&#8217; | awk &#8216;{ print $NF }&#8217; | while read l;do mkdir -p \/space\/$h$l echo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-887","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=887"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/887\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=887"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}