Mysqldump - how to create a backup of mysql database from node-red


I tried searching forum but could not get any relevant results. so here is the question.
How do I make a backup of my mysql database from node-red ?

I am able to create a backup using mysqldump command in the respective folder in windows command line opened as administrator.
mysqldump -u user -ppassword dbase > backup1.sql
How do i use this in node-red using mysql node ?

You should be able to use an exec node to run the command. Use the full path to the command and use forward slashes.

I tried, its not working. i am doing something wrong,


I don't use Windows, but i guess you need quotes round the command name. From the error it has stopped at the space.

quotes didnt help
i believe i have to change directory first and then execute the mysqldump since even in cmd prompt i am unable to execute the mysqldump directly from root

I couldn't get it going through NR.
Eventually wrote a batch file and made windows scheduler run the file every day. serves my prupose so not pursuing the NR way.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.