To perform automatic database backups, I used the Spatie package called laravel-backup, following the instructions provided here.
To verify that the database backup is working correctly manually, execute the command: php artisan backup:run. In case of any error, it is necessary to add the following to the MySQL database configuration file:
Once the command has been added to kernel.php in the Console directory, indicate the frequency at which it should be executed.
Finally, tested email notifications with Mailtrap.
To complete:
Determine if the backup:clean command is necessary, specify its frequency, and add it if required.
Decide if an email notification should be sent each time a backup is performed and, if so, adjust the mail from/to settings.
Change the dump_binary_path to point to the server's binary path.
As per the documentation, add * cd /path-to-the-project && php artisan schedule:run >> /dev/null 2>&1 to the server.
To perform automatic database backups, I used the Spatie package called laravel-backup, following the instructions provided here. To verify that the database backup is working correctly manually, execute the command: php artisan backup:run. In case of any error, it is necessary to add the following to the MySQL database configuration file:
_'dump' => [ 'dump_binary_path' => '/Applications/XAMPP/bin', //switch to server dump binary path 'use_singletransaction', 'timeout' => 60 * 5, // 5 minute timeout ],
Once the command has been added to kernel.php in the Console directory, indicate the frequency at which it should be executed. Finally, tested email notifications with Mailtrap.
To complete:
Determine if the backup:clean command is necessary, specify its frequency, and add it if required.
Decide if an email notification should be sent each time a backup is performed and, if so, adjust the mail from/to settings.
Change the dump_binary_path to point to the server's binary path.
As per the documentation, add * cd /path-to-the-project && php artisan schedule:run >> /dev/null 2>&1 to the server.