Last active
March 14, 2018 07:47
-
-
Save devzorg/1ecbdecf7e1ae22ff295b0a631042c53 to your computer and use it in GitHub Desktop.
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 | |
USER=user | |
PASS=pass | |
DBNAME=dbname | |
BKP_PATH=/backups | |
PATH=/var/www/site/data/www | |
mysqldump -u${USER} -p --lock-tables=false --single-transaction --quick --hex-blob --routines --triggers ${DBNAME} | gzip > ${DBNAME}_(DATE).sql.gz & | |
tar -C ${PATH} -zcpf ${BKP_PATH}/${DBNAME}.tgz ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment