database components backup/export/import to new EFA?

Questions and answers about how to do stuff
Post Reply
SharazJek
Posts: 70
Joined: 01 Sep 2016 05:15
Location: Dallas, TX

database components backup/export/import to new EFA?

Post by SharazJek » 18 Jan 2018 12:51

i am considering building a new EFA in place of one that will no longer authenticate to AD. if that does end up resolving the problem, what do i do about all the spam database data i have built up on the original one that has been in operation for a year? is there a procedure somewhere to recover this data into a new EFA box?

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

Re: database components backup/export/import to new EFA?

Post by shawniverson » 18 Jan 2018 14:16

Yes, sure can. Let me know if you decide to do this, and I'll post a few pointers.
Version eFa 4.0.2 now available!

SharazJek
Posts: 70
Joined: 01 Sep 2016 05:15
Location: Dallas, TX

Re: database components backup/export/import to new EFA?

Post by SharazJek » 18 Jan 2018 16:53

yes, i am interested.

doerfi
Posts: 1
Joined: 29 Jan 2018 08:00

Re: database components backup/export/import to new EFA?

Post by doerfi » 29 Jan 2018 08:29

Hallo, I´m new in here and I have to do the same. Can I please get the procedure to recover and import the needed data into a new eFa.
We have some bugs in the eFa after Update to Version 3.0.2.5 and so we want to build up a new vitual appliance with the Data from the old eFa-System?

Thx

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

Re: database components backup/export/import to new EFA?

Post by shawniverson » 29 Jan 2018 20:08

Two steps...

1) Use EFA-Backup to create a backup file, copy to new system at /var/EFA/backup, and restore using EFA-Configure
2) copy /var/spool/mailscanner/quarantine to the new system
Version eFa 4.0.2 now available!

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

Re: database components backup/export/import to new EFA?

Post by shawniverson » 29 Jan 2018 20:46

More comprehensive howto here...you shouldn't need to patch func_systemrestore as described here any more.

viewtopic.php?f=5&t=2703
Version eFa 4.0.2 now available!

SharazJek
Posts: 70
Joined: 01 Sep 2016 05:15
Location: Dallas, TX

Re: database components backup/export/import to new EFA?

Post by SharazJek » 06 May 2020 19:05

looking at this again after a couple years, im running on v4 now. its looking like EFA-Backup is not available in v4? (is that correct?)

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

Re: database components backup/export/import to new EFA?

Post by shawniverson » 07 May 2020 11:48

It is here:

eFa-Backup-cron
Version eFa 4.0.2 now available!

SharazJek
Posts: 70
Joined: 01 Sep 2016 05:15
Location: Dallas, TX

Re: database components backup/export/import to new EFA?

Post by SharazJek » 07 May 2020 12:25

sorry man, i know i asked this 2 years ago and you answered it immediately, and i apologize it took me this long to find time to mess with it.

so i see the backup is pretty comprehensive.

i have 2 new totally unique installs, already attached to my spacewalk server and ready for production operation. EFA4 already installed and no issues to report. i was hoping there was a way to import just the greylist and white/black lists (and whatever is related or associated with that). i can live without the mail quarantine or all the of the rest of the config files, as i am trying to discard "the identity" of the old server and start fresh with 2 new servers, but being able to pre-load the white/black/grey lists would cover most of "creating maturity" of a functional mail gateway.

because honestly, the biggest chore of a brand-spiggity-new EFA is baby sitting the grey list for weeks while all the previously-known senders are re-verified.

smyers119
Posts: 79
Joined: 29 Nov 2019 11:36

Re: database components backup/export/import to new EFA?

Post by smyers119 » 07 May 2020 14:15

The GUI whitelist/blacklist is part of mailwatch.
It's located In the database mailwatch
Greylisting can be duplicated by just replicating the database sqlgrey

SharazJek
Posts: 70
Joined: 01 Sep 2016 05:15
Location: Dallas, TX

Re: database components backup/export/import to new EFA?

Post by SharazJek » 09 May 2020 14:44

so this morning i scp'd the most recent backup from the EFA4 server i want to decom, over to 2 new hosts i want to replace it with. one host has the same hostname as the old server, and one is new. using the EFA retore function from the menus seems to have yielded the desired result, on both servers.

now, i wonder if i can somehow import EFA3 "maturity" into an EFA4? would this process work on an EFA4 if the source backup file came from EFA3?


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

Re: database components backup/export/import to new EFA?

Post by henk » 10 May 2020 07:11

If you build a new efa and just want a partial migration, just the black / whitelist and bayes

V3

Code: Select all

MYSQLPWD=$(grep MYSQLROOTPWD /etc/EFA-Config | sed -e 's/^.*://')
mysqldump --user=root --password=$MYSQLPWD mailscanner blacklist > list.sql
mysqldump --user=root --password=$MYSQLPWD mailscanner whitelist >> list.sql
MYSQLPWD= 
sa-learn –backup > /root/backup.txt 
V4

Code: Select all

MYSQLPWD=$(grep MYSQLROOTPWD /etc/eFa/MySQL-Config | sed -e 's/^.*://')
mysql --user=root --password=$MYSQLPWD mailscanner < list.sql
MYSQLPWD= 
sa-learn –clear
sa-learn –restore /root/backup.txt 

Post Reply