A simple bash script for backing up your mysql database. You can define the following parameters:
username of the database user
USERNAME='root';
password of the database user
PASSWORD='test';
database name
DATABASE='test';
database address
HOST='localhost';
the location (relative), where the back up wil be putted
EXPORT_FOLDER='./bck';
the prefix of the backup that will be created
EXPORT_PREFIX='test_';
Number of day, after the newly created backup will be deleted. In fact, when the backup process is completed, the script will check if in the specified folder (EXPORT_FOLDER) are located an "old" backup-s that needs to be deleted
OLDER_THAN_DAYS=1;