Hey all, we now have 2 web servers which might go offline Friday. we now have ~90 websites located on these servers and that i curently have found a method to backup each website folder to the own .tar.gz file - things i need now is to discover method to export each database from your database server since it's own SQL backup with one command.

Presently the only method I understand how is by using PHP myAdmin, however for 100+ databases that will get just a little tiresome.

It is possible to simple method to export each database since it's own SQL backup file over SSH?

You can mysqldump --all-databases but you will get just one large SQL dump.

Found this party script:

for T in `mysql -N -B -e 'show databases' -pYOUR_ROOT_PASSWORD`

   do echo $T

   mysqldump -pYOUR_ROOT_PASSWORD $T  gzip -c > $T.sql.gz


You just need to test drive it and adapt the roadOrtitles for your needs.