Create and upload hourly MySQL database backups to AWS S3

If you ever want to backup your MySQL database and send the backup files outside of the database server (in case the server crashes), here is how I have done it.

Prerequisites:
1. Create an S3 bucket
2. Know your MySQL database user name and password
3. Install AWS CLI on your database server

Step 1 — Create a file called `hourly_backup` with the following content

# Create variables that will be used later
hour=`date +%H`
mysql_user = 'YourUserName'
mysql_password='YourPassword'…