Daily Archives: 12.08.2015
mysqldump
1 2 3 4 5 6 7 |
mysqldump -h ←host→ --skip-lock-tables --skip-add-locks --no-data -u ←user→ -p ←db name→ > dump.sql # inside docker container mysqldump --skip-lock-tables --skip-add-locks --no-data -u root --password=root ←db name→ > dump.sql # this one somehow does not work on a host machine docker-compose -f docker-compose.yml exec mysql /usr/bin/mysqldump --no-data --skip-lock-tables --skip-add-locks -u root --password=root ←db name→ > dump.sql |
on k8s pod you can run this:
1 2 |
apt-get install default-mysql-client mysqldump --skip-lock-tables --skip-add-locks -h [some host] -u [user] --password=[pass] [db_name] > dump.sql |