Skip to content

Instantly share code, notes, and snippets.

View daviskregers's full-sized avatar

Dāvis Krēgers daviskregers

View GitHub Profile
@daviskregers
daviskregers / .zshrc
Last active July 4, 2018 06:28
Export all / one database from MYSQL and archive it into .tar.gz.
# References:
# https://stackoverflow.com/questions/10867520/mysqldump-with-db-in-a-separate-file
# https://unix.stackexchange.com/questions/129391/passing-named-arguments-to-shell-scripts
# -h [HOST] for host
# -u [USER] for user
# -p [PASSWORD] for password
# -d [DB] for single database (if not set, will export all databases)
dbs_export() {