javascriptmysqlnode.js

Node.js: Backup MySQL database


I want to backup a MySQL database. Is it possible to do it in Node.js? If not, what is the best way to do so?


Solution

  • simple way without libs:

    var exec = require('child_process').exec;
    var child = exec(' mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql');