Categories
backup pengkalan data

Backup semua database mysql

Skrip bash untuk dump semua db kecuali mysql, information_schema & performance_schema

echo 'show databases;' | mysql -uroot -p | grep -v ^Database$ | grep -v ^information_schema$ | grep -v ^performance_schema$ | grep -v ^mysql$ | xargs mysqldump -uroot -p --databases > all.sql

Leave a Reply

Your email address will not be published. Required fields are marked *