Or you could do them all at once if you have the root password for mysql
Code:
#!/bin/bash
cd /var/backup
for i in $(/usr/bin/mysql -uroot -p<your_root_password> -e 'show databases'|grep -v Database);
do
if ( test $i != information_schema )
then
/usr/bin/mysqldump -uroot -p<your_root_password> $i > ./$i.dump ;
fi
done
The just go to /var/backup and grab them (this assumes you have a /var/backup dir - if not change it to something else in the script.
Recent comments
22 hours 36 min ago
1 day 3 hours ago
1 day 8 hours ago
1 day 9 hours ago
2 days 5 min ago
2 days 10 min ago
2 days 5 hours ago
2 days 11 hours ago
2 days 12 hours ago
2 days 13 hours ago