{"id":74,"date":"2009-12-06T14:30:34","date_gmt":"2009-12-06T13:30:34","guid":{"rendered":"http:\/\/www.carinato.net\/?p=74"},"modified":"2009-12-06T14:30:34","modified_gmt":"2009-12-06T13:30:34","slug":"plone-backup-e-ftp-con-pipe","status":"publish","type":"post","link":"https:\/\/carinato.com\/?p=74","title":{"rendered":"Plone Backup e Ftp con pipe"},"content":{"rendered":"<p>Ecco come ho preparato un comodo script per fare il backup dell&#8217;archivio di Plone e subito dopo copiare il backup compresso con TAR in un server FTP senza lasciare nel webserver il file tgz<\/p>\n<pre>#!\/bin\/bash\n\nPLONEPATH=\"\/home\/zope\/plone32\" # where you have your buildout.cfg\nREPOZOPATH=\"${PLONEPATH}\/bin\/repozo\"\nDATAFSPATH=\"${PLONEPATH}\/var\/filestorage\/Data.fs\"\nDESTINATION=\"\/home\/zope\/backup\/repozo\"\nDBBACKUP=\"${REPOZOPATH} -BzQ -r ${DESTINATION} -f ${DATAFSPATH}\"\nFTP_SERVER_IP=\"192.168.1.21\"\nFTP_DESTINATION=\"dir1\/subdir1\"\nPYTHONPATH=\"${PLONEPATH}\/parts\/zope2\/lib\/python\"\n\nexport PYTHONPATH # otherwise repozo.py will probably not be able to find its libraries\n\nDATA=`expr $(date +%d)`\nRESTO=`expr ${DATA} % 2` # 2 set backup, on even and odd days\nDIRNAME_DESTINATION=`dirname ${DESTINATION}`\nBASENAME_DESTINATION=`basename ${DESTINATION}`\n\n`${DBBACKUP}`\n\nftp -n ${FTP_SERVER_IP} &lt;&lt;ENDSCRIPT\nuser ftp_user ftp_password\nbinary\nput \"| \/bin\/tar -czf - -C ${DIRNAME_DESTINATION} ${BASENAME_DESTINATION}\" ${FTP_DESTINATION}\/backup_${RESTO}.tgz\nbye\nENDSCRIPT<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ecco come ho preparato un comodo script per fare il backup dell&#8217;archivio di Plone e subito dopo copiare il backup compresso con TAR in un server FTP senza lasciare nel webserver il file tgz #!\/bin\/bash PLONEPATH=&#8221;\/home\/zope\/plone32&#8243; # where you have your buildout.cfg REPOZOPATH=&#8221;${PLONEPATH}\/bin\/repozo&#8221; DATAFSPATH=&#8221;${PLONEPATH}\/var\/filestorage\/Data.fs&#8221; DESTINATION=&#8221;\/home\/zope\/backup\/repozo&#8221; DBBACKUP=&#8221;${REPOZOPATH} -BzQ -r ${DESTINATION} -f ${DATAFSPATH}&#8221; FTP_SERVER_IP=&#8221;192.168.1.21&#8243; FTP_DESTINATION=&#8221;dir1\/subdir1&#8243; PYTHONPATH=&#8221;${PLONEPATH}\/parts\/zope2\/lib\/python&#8221; export [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4],"tags":[6,11,2,3],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-linux","category-webutils","tag-linux","tag-plone","tag-utils","tag-web"],"_links":{"self":[{"href":"https:\/\/carinato.com\/index.php?rest_route=\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carinato.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carinato.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carinato.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carinato.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":0,"href":"https:\/\/carinato.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/carinato.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carinato.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carinato.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}