-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Database backup doesn't include triggers #9036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@domeglic Please add more details to your description of the steps you followed when identifying this issue. Screenshots or logs would be helpful, too. |
I have added some description but I don't really understand why, the problem seems easy enough to understand and reproduce. |
We updated description: Short way to reproduce:
Expected resultmagento_backup have trigger "test_trigger" Actual resultmagento_backup do not have trigger "test_trigger" |
@domeglic, thank you for your report. |
I'm working on it #SQUASHTOBERFEST |
ADDED getTableTriggersSql() and now it returns valid SQL with drop & create queries for triggers
@ishakhsuvarov this ticket is resolved :) |
Hi @domeglic. Thank you for your report. The fix will be available with the upcoming patch release. |
Hi @domeglic. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
Preconditions
Magento CE 2.1.5, PHP 7.0.15, MariaDB 10.0.29.
Have Index in scheduled mode.
Steps to reproduce
setup:backup --db
.setup:rollback -d
.Expected result
Database is restored and includes triggers.
Actual result
Database is missing triggers, so indexing doesn't work correctly.
I noticed this problem after several product changes failed to show in the front. I realized the index was not updated and after some debugging found that there were no triggers.
I tried switching index mode to realtime and saving the product so the changes would appear. When switching back to scheduled the triggers were recreated.
I could reliably reproduce the problem afterwards which leads me to assume the problem is in the backup CLI command.
Short way to reproduce:
mysql> CREATE TRIGGER test_trigger AFTER INSERT ON catalog_product_entity FOR EACH ROW BEGIN END;
mysql> SHOW TRIGGERS;
php bin/magento setup:backup --db.
CREATE DATABASE magento_backup;
mysql -u root -p magento_backup < "/var/backups/1506349239_db.sql"
mysql> SHOW TRIGGERS from magento_backup;
Expected result
magento_backup have trigger "test_trigger"
Actual result
magento_backup do not have trigger "test_trigger"
The text was updated successfully, but these errors were encountered: