• I tryed to clone my development site to production site. When I restore previously created backup, the whole production site database was dropped and overwritten with development database.

    1. I don’t understand why need to drop database tables.
    2. After restore, the links point to development site URL-s.
    3. Post’s text was cropped. Only first few characters seen.

    I tried to reproduce this issue with other servers and DB, and always happened that.

    https://www.ads-software.com/plugins/wp-clone-by-wp-academy/

Viewing 6 replies - 1 through 6 (of 6 total)
  • well,basically,what the plugin is doing is similar to doing a database import using phpmyadmin (more or less),first it drops the tables and then it imports the database file found in the backup. that’s just how it works and this is mentioned right below the ‘I Agree’ checkbox that has to be checked to perform a restore.

    anyhow,it sounds like either the backup or the restore was not successful,otherwise #2 and #3 shouldn’t be happening.

    Thread Starter Dr. SEO

    (@drseo)

    Thank you for quick reply!

    Well… if I using phpmyadmin I have an opportunity to check what contains database before I import.

    Can you imagine, that anyone read the agreement, before press ‘I Agree’ button?

    I have never seen, and can’t imagine (before yesterday), that an IT developer write a plugin, that drop a database without any warning.

    WordPress logic that you can deploy as many deployment in a single database, as you want, only need to choose different table prefixes each. In this common scene, your plugin can kill many sites.

    So. I recommend you, that modify your plugin to check target database before drop that, and if it is not empty at least to show a warning message and ask user confirmation to drop it!

    If you did it, I will using your plugin again.

    Kind regards,
    Jozsef

    noted ?? but I honestly don’t think that it would make much of a difference because there’s already a warning telling the user that the database will be overwritten,so if someone didn’t pay attention to that,they’d probably ignore others as well.

    Thread Starter Dr. SEO

    (@drseo)

    You are right! But, I ask again: why need to drop a whole database? You need only insert some tables. An option to check only table names, and if you find matches with backed up tables, you can show a warning message, and quit, or delete only needed tables.

    I think this method can make much more useful your backup/migration plugin, because it can be used on “real” WordPress databases, where sometimes (usually) more than one sites in one database.

    Kind regards,
    Jozsef

    well there’s no need to drop everything in the database,and in fact I’m gonna get rid of that line in the next version and let the db importer handle that with ‘drop table if exists’ commands.

    Thread Starter Dr. SEO

    (@drseo)

    It sounds great! Maybe with warning message before drop anything ?? Please notify me when next version published! Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal database overwrite with many other issue’ is closed to new replies.