Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# DEPS:
# https://github.com/dropbox/dbxcli
# sudo apt-get install p7zip-full
DB_USER=
DB_PASS=
DB_NAME=
DB_TABLES=
ARC_PASS=
mysqldump -u$DB_USER -p$DB_PASS $DB_NAME $DB_TABLES > $DB_NAME.sql
7za a -y -t7z -mx9 -mhe=on -mtc=on -m0=LZMA2 -p$ARC_PASS $DB_NAME.7z $DB_NAME.sql
dbxcli put $DB_NAME.7z /backups/$DB_NAME.7z
rm $DB_NAME.sql $DB_NAME.7z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.