xavier  [ Profile ]

Sort by: Date / Title /

  1. 6 years ago
    1. #!/bin/bash
    2.  
    3. prefixe=backup
    4. suffixe=$(date +%Y%m%d)
    5. filename=$prefixe$suffixe.sql
    6. host=host
    7. database=database
    8. user=user
    9. characterSet=UTF8
    10.  
    11. mysqldump --skip-comments \
    12. --complete-insert \
    13. --default-character-set=$characterSet \
    14. --no-create-info \
    15. --skip-add-locks \
    16. --skip-opt \
    17. --host $host \
    18. --user $user \
    19. -p $database > $filename
    20.  
    21. sed -i "1iuse $database;\nSET CHARACTER SET '$characterSet';" $filename
    22. exit 0
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/125"></script>

First / Previous / Next / Last / Page 1 of 1 (1 posteets)