{"id":4619,"date":"2019-05-11T19:22:12","date_gmt":"2019-05-11T17:22:12","guid":{"rendered":"https:\/\/nil.uniza.sk\/?p=4619"},"modified":"2020-12-22T14:26:03","modified_gmt":"2020-12-22T13:26:03","slug":"moloch-upgrade-2","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/moloch-upgrade-2\/","title":{"rendered":"Moloch Upgrade"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Moloch Upgrade<\/h1>\n\n\n\n<ul class=\"wp-block-list\"><li>Authors: Tom\u00e1\u0161 Moko\u0161, Miroslav Koh\u00fatik<\/li><\/ul>\n\n\n\n<p>Upgrading Moloch to the latest version is not possible from all versions. Some older versions require installation of newer versions in an exact order. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrading to Moloch 1.1.0<\/h2>\n\n\n\n<p>The oldest version of Moloch we have had in active use was version 0.50.<br> Upgrading Moloch from version 0.50 to version 1.0 and higher requires reindexing of all session data due to the major changes introduced in version 1.0. Reindexing is done in the background after upgrading, so there is little downtime before the server is back online.<\/p>\n\n\n\n<p>Major changes in version 1.0 include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>All the field names have been renamed and analyzed fields have been removed.<\/li><li>Country codes are being changed from 3 characters to 2 characters.<\/li><li>Tags will NOT be migrated if added before 0.14.1.<\/li><li>IPv6 is fully supported and uses the Elasticsearch ip type.<\/li><\/ul>\n\n\n\n<p>Download the <a href=\"https:\/\/files.molo.ch\/builds\/ubuntu-16.04\/moloch_1.1.0-1_amd64.deb\">version 1.1.0<\/a> installation package<\/p>\n\n\n\n<p>Add execute permissions for the package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x moloch_1.1.0-1_amd64.deb<\/code><\/pre>\n\n\n\n<p>Stop all Moloch instances:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service molochcapture stop\nservice molochviewer stop<\/code><\/pre>\n\n\n\n<p>Install Moloch v1.1.0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dpkg -i moloch_1.1.0-1_amd64.deb<\/code><\/pre>\n\n\n\n<p>Run <em>\/data\/moloch\/bin\/moloch_update_geo.sh<\/em> on all nodes, this will download and update the mmdb style maxmind files. <\/p>\n\n\n\n<p>Run <em>db.pl http:\/\/localhost:9200 upgrade<\/em> , to upgrade the database.<\/p>\n\n\n\n<p>Start the Moloch instances:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service molochcapture start\nservice molochviewer start<\/code><\/pre>\n\n\n\n<p>If an issue occurs with starting the instances, check the capture and viewer logs located in <em>\/data\/moloch\/logs\/capture.log<\/em> a <em>\/data\/moloch\/logs\/viewer.log<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrading to Moloch 1.5.3 and higher<\/h2>\n\n\n\n<p>Note &#8211; To upgrade to Moloch 1.5 and higher, you need Moloch version 1.0 or 1.1 (1.1.1 is recommended). Also, all reindexing operations must be finished.<\/p>\n\n\n\n<p>Stop capture and viewer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service molochcapture stop\nservice molochviewer stop<\/code><\/pre>\n\n\n\n<p>Download the <a href=\"https:\/\/files.molo.ch\/builds\/ubuntu-14.04\/moloch_1.5.3-1_amd64.deb\">version 1.5.3<\/a> installation package<\/p>\n\n\n\n<p>Add execute permissions for the package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x moloch_1.5.3-1_amd64.deb\ndpkg -i moloch_1.5.3-1_amd64.deb<\/code><\/pre>\n\n\n\n<p>For clean installation use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/data\/moloch\/db.pl http:\/\/localhost:9200 init<\/code><\/pre>\n\n\n\n<p>If you want upgrade only:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/data\/moloch\/db.pl http:\/\/localhost:9200 upgrade<\/code><\/pre>\n\n\n\n<p>If you chose clean installation, you need to add Moloch user again because the init script removes all Moloch users:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/data\/moloch\/bin\/moloch_add_user.sh admin \"Admin User\" THEPASSWORD --admin<\/code><\/pre>\n\n\n\n<p>Start the offline monitoring directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exec \/data\/moloch\/bin\/moloch-capture -c \/data\/moloch\/etc\/config.ini --host moloch3 -m -R \/data\/moloch\/monitor\/<\/code><\/pre>\n\n\n\n<p>Start the viewer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service molochviewer start<\/code><\/pre>\n\n\n\n<p>Check the logs if an issue with starting occurs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/data\/moloch\/logs\/capture.log\n\/data\/moloch\/logs\/viewer.log<\/code><\/pre>\n\n\n\n<p>Source:<br>\n<a href=\"https:\/\/github.com\/aol\/moloch\/wiki\/FAQ#upgrading-moloch\">Moloch FAQ &#8211; Upgrading  Moloch<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Moloch Upgrade Authors: Tom\u00e1\u0161 Moko\u0161, Miroslav Koh\u00fatik Upgrading Moloch to the latest version is not possible from all versions. Some older versions require installation of newer versions in an exact order. Upgrading to Moloch 1.1.0 The oldest version of Moloch we have had in active use was version 0.50. Upgrading Moloch from version 0.50 to&#8230;<\/p>","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[178,872],"tags":[874],"class_list":["post-4619","post","type-post","status-publish","format-standard","hentry","category-atm-en","category-network-security-moloch-en","tag-moloch"],"taxonomy_info":{"category":[{"value":178,"label":"ATM"},{"value":872,"label":"Moloch"}],"post_tag":[{"value":874,"label":"Moloch"}]},"featured_image_src_large":false,"author_info":{"display_name":"Miroslav Koh\u00fatik","author_link":"https:\/\/nil.uniza.sk\/en\/author\/miroslav-kohutik\/"},"comment_info":8,"category_info":[{"term_id":178,"name":"ATM","slug":"atm-en","term_group":0,"term_taxonomy_id":429,"taxonomy":"category","description":"","parent":0,"count":23,"filter":"raw","cat_ID":178,"category_count":23,"category_description":"","cat_name":"ATM","category_nicename":"atm-en","category_parent":0},{"term_id":872,"name":"Moloch","slug":"network-security-moloch-en","term_group":0,"term_taxonomy_id":870,"taxonomy":"category","description":"","parent":707,"count":14,"filter":"raw","cat_ID":872,"category_count":14,"category_description":"","cat_name":"Moloch","category_nicename":"network-security-moloch-en","category_parent":707}],"tag_info":[{"term_id":874,"name":"Moloch","slug":"moloch","term_group":0,"term_taxonomy_id":872,"taxonomy":"post_tag","description":"","parent":0,"count":10,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/4619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=4619"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/4619\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=4619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=4619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=4619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}