I've created a cron job to dump a table from a database and it works fine:
mysqldump -u username -ppassword dbname tablename > .../backups/matches.sql
This saved the file (note the ... is just the prefix of the location).
What I'd like to do is save this daily to a folder within backups. For example, backups/20150909/matches.sql
How can I achieve this with a variable? Will the cron job create the folder if it does not exist?
Any help would be appreciated. There will be numerous tables that I want to backup daily, so I'd like to simply set up each cron job to do this.