====== Migration Guide from eFa v4 to eFa v5 ====== ===== Overview ===== Migrating from v4 to v5 is possible using the backup and restore functionality of eFa. The process involves doing the following: - Initial preparation (fact gathering) - Preparing v4 appliance - Preparing the v5 appliance - Shutting down the v4 appliance - Configuring the v5 appliance and running a restore If successful, all databases will be transferred to v5 with upgraded schema and compatible settings will be transferred. ===== Preparation ===== Before migrating, please document the following on your v4 appliance: * Username used to log into console * IP address, netmask, and default gateway * hostname * domain name * admin email (hint: look in /etc/eFa/eFa-Config for these facts 8-) ) ===== v4 Appliance Preparation ===== - Log into v4 console - Make sure you are up to date, install any missing updates - Enter Maintenance Mode - Drop to shell - sudo systemctl stop postfix (to halt mail flow) - sudo eFa-Backup-cron -backup - sudo chmod -R o+r /var/spool/MailScanner/quarantine (to loosen permissions for copy) - sudo chmod -R o+r /var/eFa/backup/* (to loosen permissions for copy) - sudo sa-learn --backup > /root/backup.txt - sudo ls /var/eFa/backup (get the name of the backup file for the next steps) ===== v5 Appliance Preparation ===== - Build a v5 using any means with sufficient storage - Do not set it up yet (if no DHCP, set a temporary static IP using NetworkManager, nmtui or nmcli) - Start eFa first-time configure (Y/n) -> n - rsync -av @:/var/eFa/backup/ /var/eFa/backup (where is the name of the backup you generated during v4 preparation) - chmod 600 /var/eFa/backup/ (secure the backup file) - chown root:root /var/eFa/backup/ (secure the backup file) - rsync -av @:/root/backup.txt /root The following steps apply if you want to keep your quarantine - rsync -rav @:/var/spool/MailScanner/quarantine/* /var/spool/MailScanner/quarantine - chmod -R o-rwx /var/spool/MailScanner/quarantine/* - chown -R postfix:mtagroup /var/spool/MailScanner/quarantine/* ===== v4 Appliance Decommission ===== * Grab any other custom configs or files you might need * Shut it down * sudo shutdown -h now ===== v5 Commission ===== * Run through initial setup via GUI or command line (log out and log back in, use same settings as the v4) * Let system reboot * Log into console * 12) System Restore (Answer yes, 1, yes) * Let system reboot * Log into console and drop to shell If your bayes database is blank in the MailWatch GUI after migration, run this: * sudo sa-learn --clear * sudo sa-learn --restore /root/backup.txt If you use 3rd party virus scanners, those will need to be installed on the new appliance.