Page 1 of 1

Migrate from ESVA to EFA

Posted: 05 Mar 2014 22:56
by shawniverson
Here's a basic howto to migrate from ESVA to EFA.

1) Export users and lists from ESVA.

SSH into your ESVA installation as root and run the following (without <>):

Code: Select all

mysqldump -u<yourmysqluser> -p<yourmysqlpassword> mailscanner users > /root/users.sql 

Code: Select all

mysqldump -u<yourmysqluser> -p<yourmysqlpassword> mailscanner userfilters > /root/userfilters.sql 

Code: Select all

mysqldump -u<yourmysqluser> -p<yourmysqlpassword> mailscanner whitelist >/root/whitelist.sql 

Code: Select all

mysqldump -u<yourmysqluser> -p<yourmysqlpassword> mailscanner blacklist >/root/blacklist.sql 
2) Transfer these sql files to your EFA system using WinSCP or similar

3) Backup your mailscanner on EFA, just in case

Look in /etc/EFA-Config for the root mysql password and copy it for the next commands

Code: Select all

sudo mysqldump -uroot -p<yourmysqlpassword> mailscanner > /root/mybackup.sql
3) Import users and lists into EFA as root

Stop mailscanner

Code: Select all

sudo service MailScanner stop

Code: Select all

sudo mysql -uroot -p<yourmysqlpassword> mailscanner < /path/to/users.sql 

Code: Select all

sudo mysql -uroot -p<yourmysqlpassword> mailscanner < /path/to/userfilters.sql 

Code: Select all

sudo mysql -uroot -p<yourmysqlpassword> mailscanner < /path/to/whitelist.sql 

Code: Select all

sudo mysql -uroot -p<yourmysqlpassword> mailscanner < /path/to/blacklist.sql 

4) Start MailScanner

Code: Select all

sudo service MailScanner start
Log in and check your work. Note that you will need to log in with the admin that originally existed in your ESVA installation.

Re: Migrate from ESVA to EFA

Posted: 06 Mar 2014 23:22
by Rob.M.P
Great guide...Had EFA configured and ready to go. Now I've migrated the data from ESVA (this was the final step) EFA will go into the production enviroment!

Many Thanks.

Re: Migrate from ESVA to EFA

Posted: 12 Mar 2014 03:03
by microcore
When I import I get the following error: mysqldump: Got error: 1045: Access denied for user 'root' @ 'localhost' (using password: YES) When trying to connect.
What is the username and password of mysql?

Re: Migrate from ESVA to EFA

Posted: 12 Mar 2014 07:05
by Rob.M.P
Have a look in /etc/EFA-Config for your MySQL Password...

Re: Migrate from ESVA to EFA

Posted: 20 Mar 2014 11:16
by microcore
I found him there ...
Thank you :D

Re: Migrate from ESVA to EFA

Posted: 16 Apr 2014 09:09
by Mr. Happy
It's also possible to import old mail into EFA.
Zip the quarantine folder and scp it to the new host.
Export the maillog to a sql file and scp this also to the new host.
Extract the quarantine file in the existing quarantine folder.
Import the sql file and run the following sql query:

Code: Select all

SELECT DISTINCT hostname FROM maillog;
This will return two records -- the new name and the old name -- run the
following SQL:

Code: Select all

UPDATE maillog SET hostname='<new hostname>', timestamp=timestamp WHERE hostname <> '<new hostname>';

Re: Migrate from ESVA to EFA

Posted: 16 Apr 2014 09:30
by shawniverson
:text-bravo:

Re: Migrate from ESVA to EFA

Posted: 04 Sep 2015 21:21
by bradleytompkins
Will these instructions work for an EFA to EFA migration? I need to migrate a well tuned EFA system from Hyper-V to VMware. Ideally without having to retrain the bayes filter.

Re: Migrate from ESVA to EFA

Posted: 14 Sep 2015 23:10
by shawniverson
Yes. Extra steps may be needed to transfer the Bayes DB, though.

Re: Migrate from ESVA to EFA

Posted: 06 Apr 2016 04:33
by pdwalker
Has anyone done an EFA to EFA migration? If so, were you successful? What extra steps did you take?

The reason I ask is that I've made a number of changes to my efa box and I'm worried that the next update will fail, or do something weird. I think I'd rather start off with an uncustomized installation and then re-add back any necessary changes (and document my changes this time).

Thoughts?

Re: Migrate from ESVA to EFA

Posted: 07 Apr 2016 23:52
by shawniverson
Perhaps we could team up on this, if you are willing.

I need to write a migration utility for the next EFA update.

Basically like backup except that it exports and imports between EFA appliances.

This is needed for v4 in the future anyway.

Re: Migrate from ESVA to EFA

Posted: 08 Apr 2016 03:45
by pdwalker
I'm game.

i run efa in kvm/qemu on a zfs file system so snapshotting is easy. it's an installation installed as 3.0.0.7, customized, upgraded to 3.0.0.8 and customized some more.

it'll be interesting to see how much that complicates things.

what do you need me to do?

Re: Migrate from ESVA to EFA

Posted: 11 Apr 2016 06:29
by pdwalker
Just to let you know. I've a snapshot of my 3.0.0.8 vm that I can use for migration testing.