Last active
September 26, 2016 20:53
-
-
Save turbopixel/be6e9199462b4d107ab8b36a709239f3 to your computer and use it in GitHub Desktop.
Revisions
-
turbopixel revised this gist
Sep 26, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ #!/bin/bash # MySQL Console Dumper # author: Nico Hemkes <www.nokes.de> # date: 26.09.2016 -
turbopixel revised this gist
Sep 26, 2016 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,11 +12,12 @@ today=$(date +"%m-%d-%Y") filename="mysql_dump-$today.sql.gz" # output start printf "\n= = = MySQL Console Dumper = = =" printf "\nstarting ...\n\n" # dump mysqldump -u"$user" -p"$pw" -Q --events --ignore-table=mysql.event --all-databases | gzip -9 > $backupDir$filename # output end printf "Backup placed at $backupDir$filename\n\n" printf "done!\n" -
turbopixel revised this gist
Sep 26, 2016 . 1 changed file with 12 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,19 @@ # author: Nico Hemkes <www.nokes.de> # date: 26.09.2016 # settings user="USER" pw="PASSWORD" backupDir="/media/backup/" today=$(date +"%m-%d-%Y") filename="mysql_dump-$today.sql.gz" # output start printf "\n= = = MySQL Console Dumper = = =\n" printf "\nstarting ...\n" # dump mysqldump -u"$user" -p"$pw" -Q --events --ignore-table=mysql.event --all-databases | gzip -9 > $backupDir$filename # output end printf "\ndone!\n\n" -
turbopixel created this gist
Sep 26, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/bash # MySQL Console Dumper # author: Nico Hemkes <www.nokes.de> # date: 26.09.2016 user="USERNAME" pw="PASSWORD" backupDir="/root/backup" filename=$(date +"%m_%d_%Y") echo "+++ MySQL Console Dumper +++" echo "" echo "start..." echo "" mysqldump -u"$user" -p"$pw" -Q --events --ignore-table=mysql.event --all-databases | gzip -9 > $backupDir/Database-$filename.sql.gz echo "... done!" echo ""