Bash script to backup each mysql database to separate files
• Aaron Addleman
If you are looking for a script written to backup your mysql databases to individual files seperated by date then the code below will help you out. Keep in mind that the script has been designed to run on a daily basis. All files under the backup directory are stamped with day and time to keep from writing over your old backups. Each time the script is executed, it looks for any directory that is older than the retention period variable. This allows for keeping your partition slice from over flowing. I might incorporate some type of size detection, but that might be for a future release of this script.