5 years ago
#!/bin/bash
prefixe=backup
suffixe=$(date +%Y%m%d)
filename=$prefixe$suffixe.sql
host=host
database=database
user=user
characterSet=UTF8
mysqldump --skip-comments \
--complete-insert \
--default-character-set=$characterSet \
--no-create-info \
--skip-add-locks \
--skip-opt \
--host $host \
--user $user \
-p $database > $filename
sed -i "1iuse $database;\nSET CHARACTER SET '$characterSet';" $filename
exit 0
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/125"></script>