Export blacklist and whitelist from ESVA and import to EFA

If you are migrating from ESVA to EFA you can export and import the black/whitelist with a simple script i wrote. note: This script doesn’t check for double entry’s.

  1. ssh to your ESVA server
  2. wget http://dl.efa-project.org/exportlists.sh
  3. chmod +x exportlists.sh
  4. ./exportlists.sh
  5. There should be a output.sql file in the directory where you executed the script. Copy this to your EFA server. You can use scp for example: scp output.sql efaadmin@<yourEFAhost>:
  6. Now ssh to your EFA machine.
  7. Execute the following command to import the black/whitelist: mysql -u root -p`cat /etc/mysql/EFA.cnf` < output.sql
  8. All done.

*Optional*
By default, the black and whitelist entry’s are added under the root (id=1) account of EFA. If you want them added under another account, just change the @userid variable in the first line of output.sql. To find out the userid:

  1. Login to the EFA webinterface
  2. Go to settings -> accounts
  3. Click on the icon of the desired user
  4. The id can be found in the addressbar, for example http://<EFAhost>/accounts/user/2/. 2 is the userid.

You can get EFA here: http://www.efa-project.org/

This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *