{"id":12440,"date":"2024-05-03T18:26:17","date_gmt":"2024-05-03T12:56:17","guid":{"rendered":"https:\/\/www.skynats.com\/?p=12440"},"modified":"2025-01-08T20:36:17","modified_gmt":"2025-01-08T15:06:17","slug":"how-to-migrate-imunify360-from-one-server-to-another","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-migrate-imunify360-from-one-server-to-another\/","title":{"rendered":"How to Migrate Imunify360 from one server to another?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1080\" height=\"1080\" sizes=\"(max-width: 1080px) 100vw, 1080px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754.png\" alt=\"Imunify360\" class=\"wp-image-12444\" style=\"width:184px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754.png 1080w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754-300x300.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754-1024x1024.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754-150x150.png 150w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/155754-768x768.png 768w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Imunify360 may need to be installed on multiple servers with similar configurations, such as during server migration or when setting up Imunify360 from one server to another. Let&#8217;s look at how to install it for multiple servers with similar configurations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-1-imunify360-installation\"><strong>1. Imunify360 Installation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install Imunify360, then start and enable the service as usual.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-2-copy-the-configuration-files\">2. Copy the configuration files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the configuration files listed below from the old server to the new server.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/etc\/sysconfig\/imunify360\/imunify360.config.d\/*<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/usr\/share\/i360-php-opts\/module.ini<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/usr\/share\/i360-php-opts\/rules_whitelist (if it exists)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/etc\/pam_imunify\/i360.ini<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/var\/i360_pam_imunify\/users\/users.txt (if it exists)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/etc\/sysconfig\/imunify360\/hooks.yaml<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To copy files from the server, use the scp or rsync commands as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -av \/etc\/sysconfig\/imunify360\/imunify360.config.d\/* root@ip_address:\/etc\/sysconfig\/imunify360\/imunify360.config.d\/\n\nrsync -av \/usr\/share\/i360-php-opts\/module.ini root@ip_address:\/usr\/share\/i360-php-opts\/module.ini\n\nrsync -av \/usr\/share\/i360-php-opts\/rules_whitelist root@ip_address:\/usr\/share\/i360-php-opts\/rules_whitelist\n\nrsync -av \/etc\/pam_imunify\/i360.ini root@ip_address:\/etc\/pam_imunify\/i360.ini\n\nrsync -av \/var\/i360_pam_imunify\/users\/users.txt root@ip_address:\/var\/i360_pam_imunify\/users\/users.txt\n\nrsync -av \/etc\/sysconfig\/imunify360\/hooks.yaml root@ip_address:\/etc\/sysconfig\/imunify360\/hooks.yaml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NOTE :<\/strong> Replace ip_address with the target server&#8217;s IP address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the target system&#8217;s notifications settings, restart the imunify-notifier using systemctl command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart imunify-notifier<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-3-export-and-import-firewall-entries\">3. Export and Import firewall entries<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To export its firewall entries such as whitelists and blacklists, run the following commands in the source server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>imunify360-agent blacklist ip list --limit 999999 | tail -n +2 | awk '{print $1}' > blacklist.txt\nimunify360-agent blacklist country list --limit 999 | tail -n +2 | awk '{print $2}' > blacklist-c.txt\nimunify360-agent whitelist ip list --limit 999999 | tail -n +2 | awk '{print $1}' > whitelist.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then copy the blacklist.txt, blacklist-c.txt, whitelist.txt files to target server using rsync or scp command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To import firewall entries, run the following commands in the target server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat blacklist.txt | xargs imunify360-agent blacklist ip add\ncat blacklist-c.txt | xargs imunify360-agent blacklist country add\ncat whitelist.txt | xargs imunify360-agent whitelist ip add<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-4-re-installation-of-features\">4. Re-installation of features<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are few features such as kernelcare, hardened-php, invisible-captcha. Re-install features from the source server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Required features can be installed using the below command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>imunify360-agent features install &lt;feature-name><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Our\u00a0<a href=\"https:\/\/www.skynats.com\/server-management\/\">Technical Team<\/a>\u00a0will be available to assist you with \u201cHow to Copy Imunify360 Setups<a href=\"https:\/\/www.imunify360.com\/\" target=\"_blank\" rel=\"noopener\">,<\/a>\u201d which can make your job a lot easier. Get in touch with\u00a0<a href=\"https:\/\/www.skynats.com\/server-management\/\">Skynats<\/a>\u00a0if you have any queries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imunify360 may need to be installed on multiple servers with similar configurations, such as during server migration or when setting up Imunify360 from one server to another. Let&#8217;s look at how to install it for multiple servers with similar configurations. 1. Imunify360 Installation Install Imunify360, then start and enable the service as usual. 2. Copy [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,68,381],"tags":[860],"class_list":["post-12440","post","type-post","status-publish","format-standard","hentry","category-blog","category-server-management","category-website-security","tag-imunify-360"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/12440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=12440"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/12440\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=12440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=12440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=12440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}