Exporting db with date stamp

Problem

How to export database with date stamp.

Solution

To export drupal database with date stamp using drush, this is how you do it:

drush sql-dump --result-file=PATH/TO/BACKUP/DIR/DBNAME_`date +"%m_%d_%Y-%H:%M"`.sql