Skip to content

Instantly share code, notes, and snippets.

@mojoaxel
Last active August 10, 2017 11:46
Show Gist options
  • Save mojoaxel/510456cc1e9af4bc56e61ecc77cfe350 to your computer and use it in GitHub Desktop.
Save mojoaxel/510456cc1e9af4bc56e61ecc77cfe350 to your computer and use it in GitHub Desktop.
#!/bin/sh
DATE=`date +%Y%m%d%H%M`
DB_HOST="localhost"
DB_NAME="xxxxxxxx"
DB_USER="xxxxxxxx"
DB_PASS="xxxxxxxxxxxxxxx"
DB_DUMPFILE=fuerthwiki_${DATE}_${DB_NAME}.sql.gz
mysqldump -v -h $DB_HOST -u $DB_USER --password=$DB_PASS $DB_NAME --lock-tables | gzip > $DB_DUMPFILE
FILES_FOLDER="../wiki"
FILES_ARCHIVEFILE=fuerthwiki_${DATE}_wikifolder.tar.gz
tar --exclude=${FILES_FOLDER}/images -zcvf $FILES_ARCHIVEFILE $FILES_FOLDER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment