Mautic Community Forums

Exporting contacts through commandline

Your software
My Mautic version is: 2.15
My PHP version is: 7.125
My Database type and version is: N/A

Your problem
My problem is: I had an old mautic installation and some contacts on them. Now, the installation is not working ( some SSL issues ) and I cannot get into the application interface.

Is there any way to export the contacts data?

I have access to the command line.

Thanks in advance

hey there,

sure if you are on a linux distribution run the following command:
mysql -u your_user db_name -p -sN -e “select firstname, lastname, email from leads” > all_my_leads.csv

where your_user = the user to your database
db_name = your database name

Let me know if you need more help.

Regarding SSL there are ways to fix this as well. What distribution have you it installed on

1 Like