How to create a daily database backup with Scheduling Actions

After reading about this new feature:

I thought I would look at creating a daily backup of the database using the Scheduling Actions component.

From doing a google search for “mysql backup database using query”, I see a lot of different results but chose to go with the result from mysql directly.

https://dev.mysql.com/doc/refman/8.0/en/backup-and-recovery.html

However, this is where I got a little confused as to how to run a mysqldump using a query. I tried some of the other various methods found in the google search, but they all resulted in an error in the mysqldump statement.

Would anyone have any ideas as to how to go about this? What I am looking for is a way to do it locally when Docker is my target but also remotely as well, preferably with the file being saved to a folder within the Wappler project.

Note: I know it is possible to save the database using the little bookmark icon in Wappler, but if it is possible to do it using the new Scheduling Actions component, that would be awesome!

2 Likes

mysqldump is a command that is run from the command line, not within a query, so you can stop trying to make that happen. :slight_smile:

I would suggest performing database backups outside of Wappler based on the infrastructure for each target. A cron job that executes mysqldump is a good place to start if you don’t have backup features builtin elsewhere.