My cronjob looks like this:
5 3 * * * mysqldump -u root test > /srv/backup/mysql_daily.dump
How can I make filename unique for every time when cronjob writes mysql_daily.dump?
|
|
For bash, maybe:
Personally, i generally only put simple commands in my |
||||
|
|
Try
which will put the current date in the format YYYYMMDD into the filename. |
||||
|
|
|
The general practice for this is to use a timestamp using
|
||||
|
|