This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET FOREIGN_KEY_CHECKS=0; | |
| # Clean order history | |
| TRUNCATE TABLE `sales_bestsellers_aggregated_daily`; | |
| TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`; | |
| TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`; | |
| # Clean order infos | |
| TRUNCATE TABLE `sales_creditmemo`; | |
| TRUNCATE TABLE `sales_creditmemo_comment`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |