µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux×ÛºÏ - ÈçºÎ½øÐÐ zope Êý¾ÝµÄ×Ô¶¯±¸·Ý£¿¿´¿´ÕâÀï¾ÍÖªµÀÁË

ÈçºÎ½øÐÐ zope Êý¾ÝµÄ×Ô¶¯±¸·Ý£¿¿´¿´ÕâÀï¾ÍÖªµÀÁË

¡¡¡¡±¸·ÝÄ¿±ê ÒòΪ zope µÄ´ó²¿·ÖÊý¾Ý¶¼±£´æÔÚ zope/var/Data.fs Õâ¸öÎļþÀËùÒÔËü¾ÍÊÇÎÒÃǵı¸·ÝµÄÄ¿±êÁË¡£µ±È»ÎÒÃDz»Ï£Íû±¸·Ýʱ°Ñ zope ·þÎñÍ£µô£¬µ«¶ÔÓÚÒ»¸ö zope ·þÎñÆ÷À´Ëµ£¬ÔËÐÐÖÐÕâ¸öÊý¾ÝÎļþÊÇËæʱ»á±»¸ÄдµÄ¡£¿¼Âǵ½Õâ¸öÎļþ³ß´çµÄ¹æÄ££¬Èç¹ûÎÒÃÇÓ²À´µÄ»°£¬ºÜ¿ÉÄÜÔÚ±¸·ÝµÄÖÐ; tar ¾Í»á°Õ¹¤£¬¸æËßÎÒÃÇÕâ¸öÎļþ¸Õ¸Õ±»ÐÞ¸ÄÁË¡£ ËùÒÔ£¬Ò»¸öÀíÖǵİ취ÊDZ¸·Ý֮ǰ¶Ô zope Êý¾ÝÎļþ½øÐÐ pack¡£È»ºó£¬Ö»Òª±¸·Ý pack ³öÀ´µÄ Data.fs.old Îļþ¾Í¿ÉÒÔÁË ºÇºÇ£¬ÊDz»ÊǺܴÏÃ÷£¿µ«ÏÖÔÚÎÊÌâÀ´ÁË¡£ Pack Ò»°ãÎÒÃÇÊÇÔÚ ZMI ÖнøÐÐ pack µÄ£¬²¢ÇÒÕâ¸ö²Ù×÷ÊÇÐèÒª¹ÜÀíÔ±µÄÉí·Ý²ÅÄܽøÐеġ£ÈçºÎÈÃÕâÒ»ÇÐ×Ô¶¯µÄ¡¢°²È«µÄ½øÐÐÄØ£¿ÎÒ¿´ÄǸö¹ÜÀíÔ±Ò²²»ÏëÌìÌìµÇµ½ ZMI Àï×ö pack ÕâÖÖÎÞÁĵŤ×÷¡£ ¼ÈÈ» pack ÊÇÔÚ zope ÀïÍê³ÉµÄ£¬±ØÈ»ÓÐÏ´ï pack Ö¸ÁîµÄ;¾¶£¬Õâ¾ÍÊÇ Control_Panel.Database.manage_pack¡£Èç¹ûÄãÊÔÊÔ : wget -q -o /dev/null --http-user=manager --http-passwd=passWord \ 'http://localhost:8080/Control_Panel/Database/manage_pack?days:float=0' ¾ÍÖªµÀÎÒËùÑÔ·ÇÐé¡£ÕâϺÃÁË£¬pack ÖÕÓÚ¿ÉÒÔ×Ô¶¯»¯½øÐÐÁË£¬ÎÒÃÇÏÖÔÚ¿ÉÒÔ°ÑÕâÃüÁî·Åµ½ cron ÀïÁË¡£µ«»¹ÓÐÒ»µãҪעÒâѽ£¬Äã°Ñ zope manager µÄ¿ÚÁ¸ãµ½ÕâÀïÁË£¬ÍòÒ»¡­¡­Èç¹û¡­¡­±»ÈË½Ò»ÑÛ¡­¡­ÊDz»ÊǺܿÉÅ¡£Ç§Íò²»Òª°ÑÕâ¹Ø¼üµÄ¿ÚÁîÓÃÃ÷Âëдµ½Èκεط½¡£ ΪÁË°²È« ÄÇô£¬ÎÒÃÇÓ¦¸ÃÔõô×öÄØ£¿×îºÃÊÇÓÃÒ»¸öÎÞ¹ØÍ´Ñ÷µÄÓû§À´Íê³ÉÕâ¸öÈÎÎñ£¬¼´Ê¹Õâ¸öÓû§±»ÈËÇÔÈ¡£¬Ò²²»ÄÜÍþвµ½ zope ϵͳµÄ°²È«¡£Õâ¾ÍÒªÓõ½ proxy ÁË¡£ ÏÖÔÚÎÒÃÇÒ»²½²½À´£º 1. ÔÚ zope root folder ÀィÁ¢ zopepack Ŀ¼£¬¼ÇµÃÑ¡ÉÏ"Create user folder"£» 2. µ½ zopepack Ŀ¼£¬½øÈë acl_users£¬Ôö¼ÓÒ»¸öÆÕͨÓû§£¬±ÈÈç½Ðpackonly£¬¼Ç×Ų»Òª¸øËü·ÖÅäÈκΠrole£» 3. µ½ zopepack Ŀ¼£¬½¨Á¢Ò»¸öÃû½Ð zopepack µÄ DTML Method£¬ÌîÈëÈçÏ´úÂ룬Ëü¸ºÔðºô½Ð pack Ö¸Áî : <dtml-if eXPr="REQUEST.has_key('days')"> <dtml-call expr="Control_Panel.Database.manage_pack(days=REQUEST['days'])"> <dtml-else> <dtml-call expr="Control_Panel.Database.manage_pack()"> </dtml-if> <dtml-var "ZopeTime()">, pack OK. 4. Õâ²½±È½ÏÖØÒª£¬ÔÚ zopepack µÄ±à¼­Ò³Ã棬µã»÷ Proxy ±êÇ©£¬Ñ¡ÉÏ Manager ÕâÒ»ÏSave Changes£» 5. OK£¬×¼±¸¾ÍÐ÷¡£ ÏÖÔÚ£¬Ö»ÒªÖ´ÐÐ : wget -q -o /dev/null 'http://packonly:packonly@localhost:8080/zopepack/zopepack' ¾Í¿ÉÒÔÁË(µ±È»£¬ÉÏÃæµÄÓû§ÃûºÍÃÜÂëÒªÌîÈëÄã×Ô¼º½¨Á¢µÄÄǸöÓû§µÄ)¡£ ÈÃÒ»ÇÐ×Ô¶¯°É£¡ ʣϵļòµ¥ÁË£¬Ôö¼ÓÒ»¸öÆô¶¯±¸·ÝµÄ½Å±¾£¬Èà root »òÕß zope Óû§×Ô¶¯Ö´ÐоͺÃÁË¡£ÕâÊÇÎÒµÄ backup-zopefs.sh£¬½ö¹©²Î¿¼ : #!/bin/sh # At first, pack zope data.fs wget -q -o /dev/null 'http://packonly:packonly@localhost:8080/zopepack/zopepack' cd /usr/local/zope/var TARGET="/home/zope/backup/zopefs-`uname -n`-`date +%Y%m%d`.tgz" tar zcf $TARGET Data.fs.old Data.fs.in Data.fs.index chown zope:zope $TARGET # ÏÂÃæ¿ÉÒÔ°Ñ tgz Îļþ¿½±´µ½Ê²Ã´µØ·½ # cp $TARGET backupDevice ... Ö´ÐÐ crontab -e£¬É趨ºÃÖ´ÐеÄʱ¼ä(µ±È»ÊÇ»úÆ÷±È½Ï¿ÕÏеÄʱ¼ä£¬ËäÈ»ÄãÖªµÀ£¬ÎÒ»¹ÊÇÈ̲»×¡¶à×ì : # Store Zope data files # Weekend, 8 pm. 0 20 * * 5 /root/backup-raccoon-zopefs.sh NOTE
[1] [2] ÏÂÒ»Ò³ 

Ö»ÔÚ Linux + zope 2.6 ÖвâÊÔ¹ý£¬Ö»²âÊÔ¹ýµ¥ Data.fs µÄϵͳ¡£ ÉÏÃ涫Î÷µÄzexp¡¢shell scriptÖ®ÀàÎļþµÄѹËõ°ü: http://www.linuxforum.net/forum/files/424347-zopebackup.tgz

£¨³ö´¦£ºhttp://www.sheup.com£©


ÉÏÒ»Ò³ [1] [2]