vbagaev
5/7/2018 - 9:08 AM

backup/restore mysql

https://habr.com/post/105954/

mysqldump -u bitrix0 -p sitemanager > ~/dump.sql

mysqladmin -u bitrix0 -p create sitemanager;

mysql -u bitrix0 -p sitemanager < ~/dump.sql

очистка базы
mysqldump -u[USERNAME] -p[PASSWORD] \
  --add-drop-table --no-data [DATABASE] | \
  grep -e '^DROP \| FOREIGN_KEY_CHECKS' | \
  mysql -u[USERNAME] -p[PASSWORD] [DATABASE]