How to generate a dynamic file name for a mysqldump on Linux?
This should do it :

mysqldump -u yourusername -h yourusername.mysql.pythonanywhere-services.com 'yourusername$dbname'  &gt; `date +"\%Y-\%m-\%d_\%H-\%M"`.db-backup.sql


Will generate files like : 2018-01-01_13-50.db-backup.sql. You can adapt this to whatever exact format you want (but you should avoid using special characters such as :).

If you want to compress the file on the fly :

mysqldump -u yourusername -h yourusername.mysql.pythonanywhere-services.com 'yourusername$dbname'  | gzip &gt; `date +"\%Y-\%m-\%d_\%H-\%M"`.db-backup.sql.gz