{"id":787,"date":"2013-04-11T11:01:21","date_gmt":"2013-04-11T09:01:21","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=787"},"modified":"2013-04-11T11:06:07","modified_gmt":"2013-04-11T09:06:07","slug":"remobackup-sh-delete-3-volte-lanno-sincronizziamo-le-copie","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=787","title":{"rendered":"remobackup.sh.delete 3 volte l&#8217;anno sincronizziamo le copie."},"content":{"rendered":"<p>Questo\u00a0 script 3 volte l&#8217;anno e pi\u00f9 precisamente il 1\u00b0 gennaio il 1\u00b0 maggio e il 1\u00b0 novembre allinea la situazione ditta\/remote location, vengono salvate tutte le directory, e vengono cancellati i files che sono stati cancellati sul cluster.<br \/>\nDal successivo salvataggio riprende la normale attivit\u00e0 e i file cancellati sul cluster non vengono cancellati in remote location.<\/p>\n<p>#!\/bin\/sh<br \/>\necho -e &#8220;syncro.sh \\n&#8221;<\/p>\n<p>echo -e &#8220;sincronizzo le directory di sangiusto\u00a0 \\n&#8221;<br \/>\nrsync -vazr -e ssh &#8211;delete \/bin\/ root@libeccio:\/sangiusto\/bin\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/boot\/ root@libeccio:\/sangiusto\/boot\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/dev\/ root@libeccio:\/sangiusto\/deVv\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/etc\/ root@libeccio:\/sangiusto\/etc\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/etcvar\/ root@libeccio:\/sangiusto\/etcvar\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/home\/ root@libeccio:\/sangiusto\/home\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/home2\/ root@libeccio:\/sangiusto\/home2\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/home3\/ root@libeccio:\/sangiusto\/home3\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/home3\/ root@libeccio:\/sangiusto\/home\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/initrd\/ root@libeccio:\/sangiusto\/initrd\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/lib\/ root@libeccio:\/sangiusto\/lib\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/opt\/ root@libeccio:\/sangiusto\/opt\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/root\/ root@libeccio:\/sangiusto\/root\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/sbin\/ root@libeccio:\/sangiusto\/sbin\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/srv\/ root@libeccio:\/sangiusto\/srv\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/usr\/ root@libeccio:\/sangiusto\/usr\/<br \/>\nsleep 5<br \/>\nrsync -vazr -e ssh &#8211;delete \/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","protected":false},"excerpt":{"rendered":"<p>Questo\u00a0 script 3 volte l&#8217;anno e pi\u00f9 precisamente il 1\u00b0 gennaio il 1\u00b0 maggio e il 1\u00b0 novembre allinea la situazione ditta\/remote location, vengono salvate tutte le directory, e vengono cancellati i files che sono stati cancellati sul cluster. Dal successivo salvataggio riprende la normale attivit\u00e0 e i file cancellati sul cluster non vengono cancellati [&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-787","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\/787","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=787"}],"version-history":[{"count":2,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/787\/revisions"}],"predecessor-version":[{"id":791,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/787\/revisions\/791"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}