[Snapshot] Can’t restore backup due to a db error

I’m trying to restore a backup but I’m getting the following error:

Snapshot failed to restore your website package in “Restoring tables” phase
Reason: Unable to restore table ‘+++_amelia_services’ from ‘/tmp/si_test5d82352d99514/+++_amelia_services.sql’ because You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘show, aggregatedPrice) VALUES (’11’, ‘H+++en’, ‘Au++++de’ at line 1

  • Kasia Swiderska
    • Support nomad

    Hello Fatih ,

    I’m sorry about this issue with restoring backups.

    I will have to escalate this to the Second Level Support developers. I have tried to manually exclude the table that was throwing an error but then restoring throw error about memory issue.
    Using php.ini I increased memory but restoring still fails on the same step.

    Our developers will check it and see what is happening there.

    kind regards,
    Kasia

  • Fatih
    • Design Lord, Child of Thor

    Hi Kasia,

    Thank you for the update. Can you give me something to hold on? I see now all is lost on the pages, all the work is gone on menslook.fatihkarlidag.biz, clients are about to drop me. I need this to get fixed as soon as possible.

  • Tho Bui
    • Staff

    Hi Fatih ,

    Apologies for the delay, I checked and the issue relates to memory limit. If we increased the memory via .ini file(s), while trying to restore the site these files will come back from the backup file. So in that case, can you try the custom file snapshot-installer.php that I attached here.

    And note, I restored the site.

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    Hi Tho,

    I’m sorry, I don’t really understand what I’m supposed to do now. Since you restored the site, is there anything left for me to do? What do I need to do with the attached file? And do I have to increase the memory now? Will backups from now on work properly?

  • Tho Bui
    • Staff

    Hey there Fatih ,

    Sorry, I restored the site. But if you want to try this again. All you need is download the attached file and upload to the root folder to replace with a new one. And make sure you increased the memory limit, then you can restore the site by using yoursite.com/snapshot-installer.php

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    Unfortunately, Snapshot does not restore my database tables properly. When I trying to import my tables manually, its throwing different errors. I am not sure if my tables are corrupt. Can you please check this?

  • Tho Bui
    • Staff

    Hey there Fatih ,

    Look like have a DB query error while trying to import on the newer MySQL version. I will discuss with our dev about this. In this case, I attached the custom file to fix this, you can download a zip, unzip it and upload file snapshot.php to your wp-content/plugins/snapshot folder and replace a new one.
    Notes, I upload it and tried to restore the file.
    Can you check your site again?

    I hope this will help!

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    I have checked, it did not work at all. See the Amelia plugin is totally messed up, I‘ll have to set it up from the beginning. In fact for it to work I’ll to (again) manually delete all tables and then set it up again, otherwise it does not work for some reason what so ever.

  • Tho Bui
    • Staff

    Hey there Fatih ,

    Sorry, can you re-check your site?
    I just have a test on your site, it’s working fine back now.
    But please remember, the backup file from regular backup file (menslook-weekly) only include the tables for this subsite not included all tables of other sites.

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    Somehow Snapshot has a special problem with the Amelia Tables in the Database. It’s not only that the content/settings (customer, services, locations) are missing after backup, I cant even just add new ones (customer, services, locations).
    Last time this happened, I was forced to delete the plugin and then manually delete all tables related to the Plugin in the Database.

  • Tho Bui
    • Staff

    Hey there fatih ,

    Sorry to hear about that!

    As you said it looks like has a conflict on the plugins. In this case, might you try to restore to the older version? And on the backup file (menslook-weekly), I have extracted this and I only see database of this sub-site and the uploads folder, don’t see theme/plugins.

    Let me know if you need my help!

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    So how can I prevent this conflict for the future? I can’t setup everything from the start every time I need to restore to a snapshot. Wpmudev Premium is useless for me I if that is not going to work. I need reliable backup system for my network since I’m hosting client sites. If it takes days to fix an issue I’ll lose more clients. This premium subscription will be a waste of time and money for my business.

  • Tho Bui
    • Staff

    Hi faith ,

    I see you have some backup files on September 23, 2019 or September 22, 2019, does your site working fine at these time?

    And now, if you deactivate the Snapshot plugin, is your site working fine? If that, can you clarify your issue, how can I replicate it? So I can help you to detect this. Also, I don’t use Amelia plugin before so that’s good if you can attach the screenshot relates your issue.

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    The problem with Snapshot is that every time I’m restoring a perfectly working site all settings (customer, services, locations) in the Amelia Booking Plugin are gone, so I have to start all over again (with Amelia). Snapshot seems not able to restore the tables related to the Amelia Plugin.
    I have even tried to restore the snapshot to another (newly created) subsite in my network, Amelia is messed up as well.
    The snapshot attached should include services, locations and employees, but unfortunately (although running restore shows green success bar) the Amelia content is all lost.

  • Tho Bui
    • Staff

    Hi Fatih ,

    yes, I manual import DB. The first I merge all tables by command line and wrap all columns of the table by quote(`) and then import the dump file.
    But I will closer check on this case why the restore function is not working on regular backup. And will reply back to you if have any news.

    Kind Regards,
    Tho Bui

  • Fatih
    • Design Lord, Child of Thor

    Awesome! I‘d really appreciate that, because I‘ll need an reliable solution and the way it is now, does not work for me. Waiting for a backup to be restored for several days defeats the purpose of itself. Meanwhile the website needing the restoration is practically down which is costing/loosing me clients in the long run.

  • Tho Bui
    • Staff

    Hello Fatih ,

    Apologize for the delay, on our host Snapshot uses the system back up process instead of so I can’t try the test on our host. And on my test host look like it does not support the lastest Mysql version, I can’t create the staging site from your backup file. In that case, can you create a staging site so I can check on this?

    Also, can you provide us with full access credentials of the staging site too?

    Note: Don’t leave your login details on this ticket.
    Instead, you can send me your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Tho Bui"
    - Site login URL
    - WordPress admin username
    - WordPress admin password
    - FTP/cPanel credentials (host/username/password)

    Kind Regards,
    Tho Bui

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.