Also, I'd like to note that I would prefer to use artisan commands if possible. :)
Best way to backup MySQL database from Laravel Forge production server?
I have a relatively small app (but still kinda big) with current database dumps being around 20 MB. So that's pretty small. But there's still some important data in there and I need it backed up on a regular basis. Preferably every time I desire by running a script on my local machine.
Before switching to Forge, I achieved this by running a mysqldump command on my local machine that connects to the server, and save the dump on my local machine, like so:
mysqldump -h mydomain.com -p the_database_name > ~/sql-dump.sql
This connected to the remote host, and got a dump of the_database_name, and saved it on my local machine as the file sql-dump.sql in my home directory.
This worked wonders, except now I can't seem to get this working on the Laravel Forge server that I just switched to. Maybe it's a mysql configuration setting on the Forge server that I need to change?
Anyway, what's the best way to achieve periodic database backups on a Laravel Forge server. Preferably by running a command or script on my local machine?
Any help or insight, greatly appreciated!
Please or to participate in this conversation.