MySQL comes with a built-in program called
mysqldump to do logical backups. It generates a SQL script of the database so that you can transfer it to another database server.
I have written a tiny wrapper around
mysqldump which can be used in Node.js applications:
Please give it a try. I would be glad If you would like to contribute.