This script is designed to automatically backup a MySQL database daily at 2 AM using a cron job. It utilizes Python and the mysqldump
utility to create backups.
- Clone or download the repository to your EC2 instance.
- Install the required dependencies by running
pip install -r requirements.txt
. - Copy the
.env.example
file and rename it to.env
. Update the variables with your SMTP server settings,email addresses and mysql username. - Configure the cron job.