Skip to content

Instantly share code, notes, and snippets.

@andreyuhai
Created June 24, 2020 18:41
Show Gist options
  • Save andreyuhai/04f14ac1a928b099c753738b896a0c09 to your computer and use it in GitHub Desktop.
Save andreyuhai/04f14ac1a928b099c753738b896a0c09 to your computer and use it in GitHub Desktop.
Show Date and Time in File Name

Source

Simply put $(date +%Y-%m-%d-%H.%M.%S)

mysqldump -u <user> -p <database> | bzip2 -c > <backup>$(date +%Y-%m-%d-%H.%M.%S).sql.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment