I use the following crontab record in order to daily backup my DB:
0 2 * * * MYSQL_PWD=password mysqldump -u user db_name > $HOME/db_backups/db_name-$(dat
There is a tool called tmpreaper that securely deletes files matching certain criteria, such as an access or modification date n days in the past.
tmpreaper