{"id":3028,"date":"2013-10-11T17:39:38","date_gmt":"2013-10-11T09:39:38","guid":{"rendered":"http:\/\/w3c.weblink.com.tw\/ks010\/?p=3028"},"modified":"2013-10-11T17:41:14","modified_gmt":"2013-10-11T09:41:14","slug":"%e3%80%90imsva%e3%80%91%e5%a6%82%e4%bd%95%e5%82%99%e4%bb%bd-imsva-8-x%e4%b8%ad%e7%9a%84%e8%a8%ad%e5%ae%9a%e3%80%81log%e3%80%81report-quarantine","status":"publish","type":"post","link":"https:\/\/w3c.weblink.com.tw\/ks010\/?p=3028","title":{"rendered":"\u3010IMSVA\u3011\u5982\u4f55\u5099\u4efd IMSVA 8.x\u4e2d\u7684\u8a2d\u5b9a\u3001Log\u3001Report &amp; Quarantine"},"content":{"rendered":"<p><b>\u4e00\u3001\u532f\u51faIMSVA 8.x <\/b><b>\u8a2d\u5b9a<\/b> <\/p>\n<p>(1) \u767b\u5165 IMSVA 8.x \u7ba1\u7406\u4e3b\u63a7\u53f0 <\/p>\n<p>(2) \u9ede\u9078 Administration \u2192 Import\/Export\uff0c\u9ede\u9078 Export\u3002 <\/p>\n<p><a href=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image253.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image_thumb253.png\" width=\"632\" height=\"354\"><\/a> <\/p>\n<p>(3) \u532f\u51fa\u5b8c\u6210\u5f8c\u6703\u5f48\u51fa\u6a94\u6848\u4e0b\u8f09\u7684\u8a62\u554f\u8996\u7a97\uff0c\u8acb\u5c07\u8a72\u8a2d\u5b9a\u5099\u4efd\u5132\u5b58\u5728\u60a8\u6240\u6307\u5b9a\u7684\u8def\u5f91 <\/p>\n<p><a href=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image254.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image_thumb254.png\" width=\"504\" height=\"326\"><\/a> <\/p>\n<p>&nbsp; <\/p>\n<p><b>\u4e8c\u3001\u5099\u4efdIMSVA postfix<\/b><b>\u4e2d\u7684main.cf<\/b><b>\u3001master.cf<\/b> <\/p>\n<p>\u8a3b\uff1a\u6b64\u6b65\u9a5f\u662f\u91dd\u5c0d\u60a8\u6709\u518d\u7279\u5225\u5c0dpostfix\u4e2d\u7684main.cf\u3001master.cf\u9032\u884c\u8abf\u6574\u624d\u9700\u624b\u52d5\u5099\u4efd\u9019\u5169\u500b\u6a94\u6848\uff0c\u5982\u679c\u60a8\u672a\u505a\u4efb\u4f55\u7279\u5225\u8abf\u6574\uff0c\u6b64\u6b65\u9a5f\u53ef\u7565\u904e\u3002 <\/p>\n<p>(1) \u60a8\u53ef\u4ee5\u900f\u904eWinscp\u9019\u5957\u5de5\u5177\u9023\u9032IMSVA\u4e2d\u5099\u4efdmain.cf\u3001master.cf <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WinSCP\u4e0b\u8f09\u9023\u7d50\uff1a<a href=\"http:\/\/winscp.net\/eng\/download.php\">http:\/\/winscp.net\/eng\/download.php<\/a> <\/p>\n<p>(2) \u4f7f\u7528WinSCP\u9023\u7dda\u81f3IMSVA\u4e0b\u7684 \/opt\/trend\/imss\/postfix\/etc\/postfix\/ \u8def\u5f91\u4e2d\u5099\u4efdmain.cf\u3001master.cf <\/p>\n<p><a href=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image255.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/w3c.weblink.com.tw\/ks010\/wp-content\/uploads\/sites\/5\/2013\/10\/image_thumb255.png\" width=\"647\" height=\"456\"><\/a> <\/p>\n<p>&nbsp; <\/p>\n<p><b>\u4e09\u3001\u5099\u4efdIMSVA<\/b><b>\u8cc7\u6599\u5eab<\/b> <\/p>\n<p>(1) \u8acb\u4f7f\u7528\u4e0b\u5217\u6307\u4ee4\u5099\u4efd IMSVA\u7684 imss \u8cc7\u6599\u5eab <\/p>\n<p><font color=\"#0000ff\"><strong>\/opt\/trend\/imss\/PostgreSQL\/bin\/pg_dump -U sa -f \/tmp\/imss_dump.sql imss<\/strong><\/font> <\/p>\n<p>\u5982\u679c\u60a8\u7684IMSVA \u6709\u555f\u7528EUQ\uff0c\u8acb\u518d\u7528\u4e0b\u5217\u6307\u4ee4\u5099\u4efdEUQ\u8cc7\u6599\u5eab <\/p>\n<p><font color=\"#0000ff\"><strong>\/opt\/trend\/imss\/PostgreSQL\/bin\/pg_dump -U sa -f \/tmp\/imsseuq_dump.sql imsseuq<\/strong><\/font> <\/p>\n<p>(2) \u4f7f\u7528WinSCP\u9023\u7dda\u81f3IMSVA\u4e0b\u7684 \/tmp\u8def\u5f91\u4e2d\u53d6\u51fa\u8cc7\u6599\u5eab\u5099\u4efd\u6a94 <\/p>\n<p>imss_dump.sql <\/p>\n<p>imsseuq_dump.sql <\/p>\n<p>&nbsp; <\/p>\n<p><b>\u56db\u3001\u5099\u4efdIMSVA Log File<\/b> <\/p>\n<p><b><\/b> <\/p>\n<p>(1) \u8acb\u4f7f\u7528WinSCP\u9023\u7dda\u81f3IMSVA\u4e0b\u7684 \/opt\/trend\/imss\/log (var\/app_data\/imss\/log)\u8def\u5f91\u4e2d <\/p>\n<p>(2) \u8acb\u5099\u4efd\u8a72\u8def\u5f91\u5167\u7684\u6240\u6709\u6a94\u6848 <\/p>\n<p><b><\/b>&nbsp; <\/p>\n<p><b>\u4e94\u3001\u5099\u4efd\u9694\u96e2\u5340\u4fe1\u4ef6<\/b> <\/p>\n<p>(1) \u8acb\u4f7f\u7528WinSCP\u9023\u7dda\u81f3IMSVA\u4e0b\u7684 \/opt\/trend\/imss\/queue\/quarantine\u8def\u5f91\u4e2d <\/p>\n<p>(2) \u8acb\u5099\u4efd\u8a72\u8def\u5f91\u5167\u7684\u6240\u6709\u6a94\u6848 <\/p>\n<p><b><\/b>&nbsp; <\/p>\n<p><b>\u516d\u3001\u5099\u4efdIMSVA Report<\/b><b>\u6a94\u6848<\/b> <\/p>\n<p>(1) \u8acb\u4f7f\u7528WinSCP\u9023\u7dda\u81f3IMSVA\u4e0b\u7684 \/opt\/trend\/imss\/UI\/adminUI\/ROOT\/logs\/  <\/p>\n<p>(2) \u8acb\u5099\u4efd\u8a72\u8def\u5f91\u5167\u7684\u6240\u6709\u6a94\u6848\u53ca\u76ee\u9304 <\/p>\n<p>&nbsp; <\/p>\n<p><font color=\"#0000ff\"><b>\u203b <\/b><b>\u4ee5\u6392\u7a0b\u65b9\u5f0f\u5099\u4efdIMSVA<\/b><\/font> <\/p>\n<p><b><\/b> <\/p>\n<p>1. \u7de8\u8f2f\u4e00\u6587\u4ef6\u6a94\uff0c\u4e26\u5c07\u5167\u5bb9\u7de8\u8f2f\u5982\u4e0b\uff1a <\/p>\n<p>cd \/var\/app_data\/imsva_backup <\/p>\n<p>tar -cvf postfix_`date +%F`.tar \/opt\/trend\/imss\/postfix\/etc\/postfix\/*.cf <\/p>\n<p>cp -R \/var\/app_data\/imss\/log log <\/p>\n<p>tar -cvf log_`date +%F`.tar log <font color=\"#ff0000\">\u2190 \u53ef\u80fd\u6703\u6709\u554f\u984c\uff0c\u6703\u4e2d\u65b7\u6216\u7522\u751ferror<\/font> <\/p>\n<p>cp -R \/var\/app_data\/imss\/queue\/quarantine quarantine <\/p>\n<p>tar -cvf quarantine_`date +%F`.tar quarantine <font color=\"#ff0000\">\u2190 \u53ef\u80fd\u6703\u6709\u554f\u984c\uff0c\u6703\u4e2d\u65b7\u6216\u7522\u751ferror<\/font> <\/p>\n<p>tar -cvf report_`date +%F`.tar \/opt\/trend\/imss\/\/UI\/adminUI\/ROOT\/logs <\/p>\n<p>\/opt\/trend\/imss\/PostgreSQL\/bin\/pg_dump -U sa -f imss_dump_`date +%F`.sql imss <\/p>\n<p>\/opt\/trend\/imss\/PostgreSQL\/bin\/pg_dump -U sa -f imsseuq_dump_`date +%F`.sql imsseuq <\/p>\n<p>2. \u5c07\u6b64\u6587\u4ef6\u6a94\u4ee4\u5b58\u6a94\u540d\u70baxxxxxx.sh (\u5982imsva_backup.sh\uff0c\u975etxt\u6a94) <\/p>\n<p>3. \u5c07\u6b64\u6a94\u6848\u7f6e\u653e\u65bcimsva\u4e2d\uff0c\u4e26\u8ce6\u4e88\u6b64\u6a94root\u4e4b\u6b0a\u9650 <\/p>\n<p>#chmod 777 imsva_backup.sh <\/p>\n<p>4. \u4f7f\u7528crontab\u6307\u4ee4(linux\u5099\u4efd\u6307\u4ee4)\u4f86\u81ea\u5b9a\u6392\u7a0b\u57f7\u884cimsva_backup.sh\u9032\u884c\u5099\u4efd\u6392\u7a0b\u4f5c\u696d\u3002 <\/p>\n<p><b><\/b>&nbsp; <\/p>\n<p><b><font color=\"#0000ff\">\u203b Configuring a scheduled backup of local settings and policies in InterScan Messaging <\/font><\/b> <\/p>\n<p><b>Security Virtual Appliance (IMSVA)<\/b> <\/p>\n<p><b>Problem Description<\/b><b>\uff1a<\/b> <\/p>\n<p>Currently, the only way to back up the local settings and policies of IMSVA is using the \u201cExport\u201d function in the web console. You cannot use this to perform a scheduled backup. <\/p>\n<p>An alternative way to conduct a scheduled backup is through a cron job. <\/p>\n<p><b>Solution<\/b><b>\uff1a<\/b> <\/p>\n<p>To configure a scheduled backup: <\/p>\n<p>Note: This will not back up log files. <\/p>\n<p>1.Log in to IMSVA with root privileges through the local console or an SSH connection. <\/p>\n<p>2.Run the following command to edit the scheduled jobs:  <\/p>\n<p># crontab -e <\/p>\n<p>3.Go to the \u201cInsert\u201d mode by pressing the I key.  <\/p>\n<p>4.Add the following line at the end of all jobs:  <\/p>\n<p>0 6 * * * \/opt\/trend\/imss\/script\/imp_exp.sh -e \/tmp\/IMSVAConfigExport$(date +\\%Y\\%m\\%d.dat) &gt; \/dev\/null 2&gt;&amp;1 <\/p>\n<p>This will back up the configuration into the \/tmp folder every day at 6:00 AM, and name it in the format &#8220;IMSVAConfigExportyyyymmdd.dat\u201d. It can then be directly imported into another IMSVA from the web console. <\/p>\n<p>5.Save the changes and quit by pressing the combination of keys in the order they appear:  <\/p>\n<p>[ESC] : x <\/p>\n<p>6.Press Enter. <\/p>\n<p>7.Run the following command to verify the changes:  <\/p>\n<p>#crontab -1 <\/p>\n<p>&nbsp; <\/p>\n<p><font color=\"#0000ff\">\u203b <b>[Linux <\/b><b>\u547d\u4ee4<\/b><b>] crontab : <\/b><b>\u8a2d\u5b9a\u6392\u7a0b\u5de5\u4f5c<\/b><b> <\/b><\/font> <\/p>\n<p>\u5c6c\u6027 : \u7cfb\u7d71\u76f8\u95dc &#8211; \u6642\u9593\u6392\u7a0b <\/p>\n<p>\u8a9e\u6cd5 :  <\/p>\n<p>crontab [-u \u4f7f\u7528\u8005] \u6a94\u6848\u540d\u7a31 <\/p>\n<p>crontab [-u \u4f7f\u7528\u8005] -l \/ -r \/ -e  <\/p>\n<p>\u53c3\u6578\uff1a\u529f\u80fd <\/p>\n<p>-e\uff1a\u7de8\u8f2f\u8a72\u4f7f\u7528\u8005\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>-l\uff1a\u5217\u51fa\u8a72\u4f7f\u7528\u8005\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>-r\uff1a\u522a\u9664\u8a72\u4f7f\u7528\u8005\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>-u\uff1a\u8a2d\u5b9a\u8a72\u4f7f\u7528\u8005\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>\u6392\u8a2d\u8a2d\u5b9a\u683c\u5f0f :  <\/p>\n<p>\u5206 \u5c0f\u6642 \u65e5 \u6708 \u661f\u671f \u6307\u4ee4\u8207\u53c3\u6578 <\/p>\n<p>\u5176\u4e2d\u5206\u662f 0-59, \u5c0f\u6642\u662f0-23, \u65e5\u70ba 1-31, \u6708\u70ba 1-12, \u661f\u671f\u70ba0-7 (0,7 \u90fd\u662f\u661f\u671f\u5929)  <\/p>\n<p>\u57f7\u884c\u7bc4\u4f8b\uff1a <\/p>\n<p>* \u5217\u51fa\u81ea\u5df1\u7684\u6392\u7a0b\u8a2d\u5b9a.  <\/p>\n<p>server1:~ # crontab -l  <\/p>\n<p># DO NOT EDIT THIS FILE &#8211; edit the master and reinstall.  <\/p>\n<p># (\/tmp\/crontab.XXXXQWEAHj installed on Mon Jul 20 05:46:44 2009)  <\/p>\n<p># (Cron version V5.0 &#8212; $Id: crontab.c,v 1.12 2004\/01\/23 18:56:42 vixie Exp $)  <\/p>\n<p># Min Hour Day Month Week Order  <\/p>\n<p>0 3 * * * \/opt\/check.pl -quiet  <\/p>\n<p>* \u7de8\u8f2f\u81ea\u5df1\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>server1:~ # crontab -e &lt; \u6309\u4e0bEnter\u5f8c\u6703\u9032\u5165\u7de8\u8f2f\u6a21\u5f0f, \u81f3\u65bc\u662f\u54ea\u4e00\u7a2e\u7de8\u8f2f\u5668, \u8996\u7cfb\u7d71\u800c\u5b9a.&gt;  <\/p>\n<p>* \u522a\u9664\u5176\u4ed6\u4f7f\u7528\u8005\u7684\u6392\u7a0b\u8a2d\u5b9a <\/p>\n<p>server1:~ # crontab -u john -l  <\/p>\n<p># DO NOT EDIT THIS FILE &#8211; edit the master and reinstall.  <\/p>\n<p># (\/tmp\/crontab.XXXXkhAaya installed on Mon Jul 20 05:50:30 2009)  <\/p>\n<p># (Cron version V5.0 &#8212; $Id: crontab.c,v 1.12 2004\/01\/23 18:56:42 vixie Exp $)  <\/p>\n<p>0 3 * * * \/opt\/check.pl -quiet  <\/p>\n<p>server1:~ # crontab -u john -r &lt;\u79fb\u9664john\u7684\u6392\u7a0b\u8a2d\u5b9a&gt;  <\/p>\n<p>server1:~ # crontab -u john -l  <\/p>\n<p>no crontab for john  <\/p>\n<p>\u88dc\u5145\u8aaa\u660e :  <\/p>\n<p>1. \u6211\u5011\u53ef\u4ee5\u900f\u904e\u6392\u7a0b\u8a2d\u5b9a\u5b9a\u671f\u5e6b\u6211\u5011\u505a\u5099\u4efd\u6a94\u6848, \u5b89\u5168\u6aa2\u6e2c, \u6e05\u7406\u78c1\u789f\u7b49, \u56e0\u6b64\u8981\u5b78\u597d\u9019\u9805\u597d\u7528\u7684\u6307\u4ee4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u532f\u51faIMSVA 8.x \u8a2d\u5b9a (1) \u767b\u5165 IMSVA 8.x \u7ba1\u7406\u4e3b\u63a7\u53f0 (2) \u9ede\u9078 Administ [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-3028","post","type-post","status-publish","format-standard","hentry","category-imsva"],"_links":{"self":[{"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/posts\/3028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3028"}],"version-history":[{"count":1,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/posts\/3028\/revisions"}],"predecessor-version":[{"id":3029,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=\/wp\/v2\/posts\/3028\/revisions\/3029"}],"wp:attachment":[{"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3c.weblink.com.tw\/ks010\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}