Last active
December 21, 2015 00:18
-
-
Save atomsfat/6218618 to your computer and use it in GitHub Desktop.
Mysql backup shell
This file contains 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 characters
#!/bin/bash | |
fecha=$(date +%Y%m%d_%H%M) | |
echo "ready to dump database" | |
mysqldump -u root database --ignore-table=logs > /tmp/dump-$fecha.sql | |
echo "comprimiendo" | |
pbzip2 /tmp/dump-$fecha.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment