Skip to content

Instantly share code, notes, and snippets.

@denislutz
Last active December 16, 2015 21:29
Show Gist options
  • Save denislutz/5500438 to your computer and use it in GitHub Desktop.
Save denislutz/5500438 to your computer and use it in GitHub Desktop.
Create database giving it the stamp for the latest day in the file Adjust your user and database, as well as the path
#!/bin/bash
$ENV_ID="stage0"
mkdir ~/db_dumps
mysqldump -u root -p databasename | gzip > ~/db_dumps/dump_projectx_$ENV_ID-`date +%F_%T`.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment