Mautic Community Forums

Can't add Segment/campaign after restore

I can’t not add segments or campaign after restoring mautic from a backup (self hosted VPS).



When I add a segment/campaign it creates it with ID 0, then if I add another segment it overwrites the segment with ID 0 instead of creating a new one.





I had to restore the database + files:



I backup the database by going to phpmyadmin > export and I also backup the file as well.



When I restored the database using phpmyadmin I got this error: https://www.screencast.com/t/gsWWqpbZqKp

I also tried to restore using MySQLDumber I got this error: https://www.screencast.com/t/inM6yP4SFK



I tried a few times and I also deleted the database before each restore.



based in the errors It looks like something went wrong with the database.



Do you know if this can be fixed? or how you can restore the database with these errors?



Cheers


I can’t not add segments or campaign after restoring mautic from a backup (self hosted VPS).

When I add a segment/campaign it creates it with ID 0, then if I add another segment it overwrites the segment with ID 0 instead of creating a new one.

I had to restore the database + files:

I backup the database by going to phpmyadmin > export and I also backup the file as well.

When I restored the database using phpmyadmin I got this error: https://www.screencast.com/t/gsWWqpbZqKp
I also tried to restore using MySQLDumber I got this error: https://www.screencast.com/t/inM6yP4SFK

I tried a few times and I also deleted the database before each restore.

based in the errors It looks like something went wrong with the database.

Do you know if this can be fixed? or how you can restore the database with these errors?

Cheers

I think I figured it out.

Mautic sharing database with wordpress:
I have mautic installed but its using the same database as my wordpress site.

The reason I’m using the same database is because I use a backup plugin which also backs up Mautic (database + files) as it uses the same database and file location.

Another thing I noticed is that when I deleted the cache file mautic would break even though it generated a new cache file.

The wordpress prefix is different to the mautic prefix E.g wordpress: wp_ and mautic: mu_

Mautic works perfectly when sharing the database, however I found that the issue comes when trying to restore the database.

it would be nice if I could get it working because I’ve set up a lot of campaigns, emails etc…

Mautic on a separate database
I installed mautic using a separate database, deleted the database and re-uploaded it without any errors. Also I after restoring the database I can add segments/campaigns.

So it looks like Mautic does not like to restore the database if its shared with a wordpress site.

[b]Do you know if Mautic should be able to restore if your sharing the same database with your wordpress site?

Should I be using a separate database?[/b]