Skip to content

Instantly share code, notes, and snippets.

@BronzePointKrel
Forked from JoshuaEstes/mysqldump.sh
Last active September 9, 2018 18:49
Show Gist options
  • Select an option

  • Save BronzePointKrel/84568c10983648d24c43fb85b169a4fd to your computer and use it in GitHub Desktop.

Select an option

Save BronzePointKrel/84568c10983648d24c43fb85b169a4fd to your computer and use it in GitHub Desktop.
[MySQL - Snippets] Snippets, Gists and Scripts for working with MySQL #database
#!/usr/bin/env bash
#
# Create a DB dump named with todays date and time.
#
USERNAME=""
DATABASENAME=""
mysqldump -u "$USERNAME" -p "$DATABASE_NAME" > $(date +"%m-%d-%y_%H-%M%p").sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment