{"id":782,"date":"2013-04-11T10:54:05","date_gmt":"2013-04-11T08:54:05","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=782"},"modified":"2013-04-11T11:07:00","modified_gmt":"2013-04-11T09:07:00","slug":"remobackup-sh-ogni-2-giorni-salviamo-a-25-km-di-distanza","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=782","title":{"rendered":"remobackup.sh ogni 2 giorni salviamo a 25 km di distanza."},"content":{"rendered":"<p>Questo\u00a0 script provvede ogni 2 giorni a creare su una macchina remota\u00a0 la copia dei dati del cluster, vengono salvate tutte le directory, e non vengono cancellati i files che sono stati cancellati sul cluster.<br \/>\nAggiungo che in pi\u00f9 di una occasione questo backup che pu\u00f2 sembrare inutilmente ridondante e ai limiti dell&#8217;assurdo ci ha salvato in extremis.<\/p>\n<p>#!\/bin\/sh -x<br \/>\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin<\/p>\n<p>#!\/bin\/sh<\/p>\n<p>libeccio=172.27.1.2<\/p>\n<p>echo -e &#8220;sincronizzo le directory di sangiusto\u00a0 \\n&#8221;<br \/>\nrsync -vazr -e ssh \/bin\/ root@$libeccio:\/sangiusto\/bin\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/boot\/ root@$libeccio:\/sangiusto\/boot\/<br \/>\nsleep 5<br \/>\n#rsync -vazr -e ssh \/dev\/ root@$libeccio:\/sangiusto\/dev\/<br \/>\n#sleep 5<br \/>\nrsync -vazr -e ssh \/etc\/ root@$libeccio:\/sangiusto\/etc\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/etcvar\/ root@$libeccio:\/sangiusto\/etcvar\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/home\/ root@$libeccio:\/sangiusto\/home\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/home2\/ root@$libeccio:\/sangiusto\/home2\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/home3\/ root@$libeccio:\/sangiusto\/home3\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/home4\/ root@$libeccio:\/sangiusto\/home4\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/initrd\/ root@$libeccio:\/sangiusto\/initrd\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/lib\/ root@$libeccio:\/sangiusto\/lib\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/opt\/ root@$libeccio:\/sangiusto\/opt\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/root\/ root@$libeccio:\/sangiusto\/root\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/sbin\/ root@$libeccio:\/sangiusto\/sbin\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/srv\/ root@$libeccio:\/sangiusto\/srv\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/usr\/ root@$libeccio:\/sangiusto\/usr\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh \/var\/ root@$libeccio:\/sangiusto\/var\/<br \/>\nsleep 5<\/p>\n<p>echo -e &#8220;esco dalla shell \\n&#8221;<\/p>\n<p>exit 0<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Questo\u00a0 script provvede ogni 2 giorni a creare su una macchina remota\u00a0 la copia dei dati del cluster, vengono salvate tutte le directory, e non vengono cancellati i files che sono stati cancellati sul cluster. Aggiungo che in pi\u00f9 di una occasione questo backup che pu\u00f2 sembrare inutilmente ridondante e ai limiti dell&#8217;assurdo ci ha [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,7,6],"tags":[18,22,24,23,20,21],"class_list":["post-782","post","type-post","status-publish","format-standard","hentry","category-linux","category-script","category-sistemi-operativi","category-work","tag-backup","tag-copia","tag-disaster-recovery","tag-remote-location","tag-restore","tag-rsync"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=782"}],"version-history":[{"count":4,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/782\/revisions"}],"predecessor-version":[{"id":792,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/782\/revisions\/792"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=782"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}