Scott Robinson Technical Lead

Adding Backups to Your Laravel Project

If you have a Laravel project and need a simple backup solution, I’d recommend Shawn McCool’s database-backup. Follow the instructions to get that configured to your liking and you can then cron a task like this:

php artisan db:backup --destinationPath=`hostname`-`date +%Y-%m-%d`.sql --destination=dropbox --database=mysql --compression=gzip

To automatically stick a daily backup to Dropbox or any other filesystem provider supported by Flysystem.

Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.