After painful many years of server migrations for clients, finally found a single line script online for dumping all databases. I made a minor modification for Plesk so that it can take the encrypted password from Plesk and pass it to mysql.
It finds all the databases in your Plesk install and dumps them each into individual gzipped file.
for I in $(mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e 'show databases' -s --skip-column-names); do mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` $I | gzip > "$I.sql.gz"; done
admin
This Post is helpful