Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2019 21:41
What would you like to do?
#!/usr/bin/env bash
current_date=`date +%Y_%m_%d_%H_%M`;
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump
mkdir -p "$current_date";
mysqldump --net_buffer_length="83000" -u wp_user -pwp_password -h -P 32770 --skip-extended-insert wordpress > /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date"/"$current_date".sql
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date";
echo "adding new sql file to repo"
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/
git add /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date"/"$current_date".sql
Copy link

icetee commented Jan 4, 2019

Maybe change: /Users/richardzilahi/ to ~/ ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment