Migration

Testing of eFa 4
Post Reply
fastbone
Posts: 2
Joined: 05 Jan 2019 08:20

Migration

Post by fastbone » 20 Jan 2019 06:42

Are there any instructions/tools to migrate existing data from 3.x to 4?

jamerson
Posts: 109
Joined: 19 Aug 2017 18:57
Location: kaaskop

Re: Migration

Post by jamerson » 20 Jan 2019 15:05

Please stay tuned we are testing the migration tools
Version eFa 4.0.0 RC1 now available in testing repo. Come join us in advancing eFa!

User avatar
shawniverson
Posts: 2715
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Migration

Post by shawniverson » 26 Jan 2019 20:25

Migration testers are needed!
Version eFa 4.0.0 RC2 now available in testing repo. Come join us in advancing eFa!

Justin
Posts: 90
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Migration

Post by Justin » 28 Jan 2019 10:08

shawniverson wrote:
26 Jan 2019 20:25
Migration testers are needed!
Feel free to PM me.
I can clone my production VM to provide migration tests.

sbozzy
Posts: 1
Joined: 29 Jan 2019 18:43
Location: South Africa

Re: Migration

Post by sbozzy » 29 Jan 2019 18:44

shawniverson wrote:
26 Jan 2019 20:25
Migration testers are needed!
Also available for migration testing, I have a 3.0.2.6 VM that I can clone for testing as well.
PM if you need.

User avatar
shawniverson
Posts: 2715
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Migration

Post by shawniverson » 30 Jan 2019 19:52

Going to start migration testing here soon, and will make step-by-step instructions for everybody to try in a test environment/clone...
Version eFa 4.0.0 RC2 now available in testing repo. Come join us in advancing eFa!

jkissane
Posts: 6
Joined: 14 Dec 2018 10:32

Re: Migration

Post by jkissane » 31 Jan 2019 09:17

Similar to the above, shouldn't be a problem cloning our existing efa VM to test a migration.

User avatar
shawniverson
Posts: 2715
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Migration

Post by shawniverson » 02 Feb 2019 16:59

Version eFa 4.0.0 RC2 now available in testing repo. Come join us in advancing eFa!

henk
Posts: 290
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Migration

Post by henk » 02 Feb 2019 22:13

I tested the migration as documented. I've no opendkim installed. Almost perfect :)
First I did a yum update. Massive update and copyed the latetest backup to the new efa and started restore.

issue 1
/var/log/maillog
Feb 2 21:24:18 sansspam sqlgrey: 2019/02/02-21:24:18 Server closing!
Feb 2 21:24:18 sansspam sqlgrey: Couldn't unlink "/var/run/sqlgrey.pid" [Permission denied]
Feb 2 21:38:32 sansspam MailScanner[9379]: MailScanner Email Processor version 5.1.3 starting...

looks like : the /etc/sqlgrey/sqlgrey.conf is restored to the v3 version with old /var/run path

issue 2
The bayes database is restored, but no access via the Gui.
2019 Bayes Database Info.png
2019 Bayes Database Info.png (2.26 KiB) Viewed 248 times
Not clear why.

Only Import bayes works fine:

On v3 :
backup bayes

Code: Select all

sa-learn --backup > backup.txt
On v4
Clear and restore bayes backup

Code: Select all

sa-learn --clear
sa-learn --restore backup.txt
No need to mention that additional scanners like Sophos should be installed manualy :shifty:

==============<<<<<<<<<<Migration messages >>>>>>>>>>>========================

eFa v3 backup detected, performing migration...
Added new: Milter Max Children = 10
Added new: Milter Dispatcher = postfork
Added new: Milter PID File = /var/run/MSMilter.pid
Added new: MSMail Queue Type = long
Added new: MSMail Delivery Method = QMQP
Added new: MSMail Socket Type = unix
Added new: MSMail Socket Dir = /var/spool/postfix/public/qmqp
Added new: MSMail Relay Port = 25
Added new: MSMail Relay Address = 127.0.0.1
Added new: Milter Ignore Loopback = no
Added new: Milter Scanner = yes
Added new: Milter Port = 33333
Added new: Milter Bind = 127.0.0.1
Added new: Highlight Hidden URLs = no
Added new: Web Bug Replacement = http://dl.efa-project.org/static/1x1spacer.gif
Added new: Quarantine Denial Of Service = yes
Added new: Spam List Skip If Authenticated = no
Added new: Lockfile Dir = /var/spool/MailScanner/incoming/Locks
Added new: include /etc/MailScanner/conf.d/*
Last edited by henk on 03 Feb 2019 19:13, edited 1 time in total.

User avatar
shawniverson
Posts: 2715
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Migration

Post by shawniverson » 03 Feb 2019 00:24

Documentation updated, and fixed sqlgrey.conf issue in update 23.
Version eFa 4.0.0 RC2 now available in testing repo. Come join us in advancing eFa!

henk
Posts: 290
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Migration

Post by henk » 04 Feb 2019 15:22

Migration, second try.

I reverted EFA4 to the situation before the yum update. ( after the kickstart build and eFa configure)

1. yum check-update and a yum update
2. reboot
3. Copy the EFA backup and the bayes backup to efa 4
4. Restore EFA backup ( Option 12)
- After the restore backup bayes data is not visible via the gui.
5. Clear bayes database via the Gui ( TOOLS AND LINKS-> SpamAssassin Bayes Database Info-> Clear Bayes Database)
6. Restore bayes ( sa-learn --restore backup.txt)
7 . Login and watch the miracle of your new Efa 4 with all the data from Efa3, without any error :clap: :dance: :violin:

jkissane
Posts: 6
Joined: 14 Dec 2018 10:32

Re: Migration

Post by jkissane » 04 Feb 2019 15:22

I'll give this a try tomorrow as bit too busy at work today.

jamerson
Posts: 109
Joined: 19 Aug 2017 18:57
Location: kaaskop

Re: Migration

Post by jamerson » 05 Feb 2019 22:46

i have migrated today like 6 EFAS and everything seems fine,
i've even migrated the MariaDB from one box to other.
Version eFa 4.0.0 RC1 now available in testing repo. Come join us in advancing eFa!

henk
Posts: 290
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Migration

Post by henk » 06 Feb 2019 18:53

The best final test is a reboot :oops: :oops:
As I continued the test, I noticed sqlgrey could not access mysql after the migration.

Code: Select all

 systemctl status sqlgrey
● sqlgrey.service - SQLgrey Postfix Grey-listing Policy service
Active: inactive (dead) since Wed 2019-02-06 19:22:15 CET; 6min ago
1 efa systemd[1]: Started SQLgrey Postfix Grey-listing Policy service.
1 efa sqlgrey[13581]: dbaccess: can't connect to DB: Access denied for user 'sqlgrey'@'localhost' (using password: YES)
1 efa sqlgrey[13581]: dbaccess: error: couldn't get now() from DB: Access denied for user 'sqlgrey'@'localhost' (using password: YES)
1 efa sqlgrey[13581]: dbaccess: can't connect to DB: Access denied for user 'sqlgrey'@'localhost' (using password: YES)
1 efa sqlgrey[13581]: dbaccess: error: couldn't access config table: Access denied for user 'sqlgrey'@'localhost' (using password: YES)
1 efa sqlgrey[13581]: 2019/02/06-19:22:15 Server closing!
1 efa systemd[1]: Stopping SQLgrey Postfix Grey-listing Policy service...
1 efa systemd[1]: Stopped SQLgrey Postfix Grey-listing Policy service.

The v3 password is correctly set is de mysql.user table and in /etc/eFa/SQLGrey-Config
However, the /etc/sqlgrey/sqlgrey.conf still contains the v4 password ( and 2 duplicate entries)

## Database settings
# instead of Pg below use "mysql" for MySQL, "SQLite" for SQLite
# any DBD driver is allowed, but only the previous 3 have been tested
db_type = mysql
db_type = mysql duplicate entry should be removed#####
db_name = sqlgrey
db_name = sqlgrey duplicate entry should be removed####
# Note: the following are not used with SQLite
db_host = localhost
db_port = default
user = sqlgrey
db_pass = ***the efa4 password before migration*** remove this one
db_pass = <<password from /etc/eFa/SQLGrey-Config or the .v3 sqlgrey.conf>>

Code: Select all

systemctl restart sqlgrey && systemctl status sqlgrey
● sqlgrey.service - SQLgrey Postfix Grey-listing Policy service
Loaded: loaded (/usr/lib/systemd/system/sqlgrey.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/sqlgrey.service.d
└─override.conf
Active: inactive (dead) since Wed 2019-02-06 19:22:15 CET; 6min ago
Process: 13558 ExecStart=/usr/sbin/sqlgrey -d (code=exited, status=0/SUCCESS)
Main PID: 13581 (code=exited, status=0/SUCCESS)

Post Reply