Advertisement
Guest User

Untitled

a guest
Apr 13th, 2016
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2. FILE=minime.sql.`date +%F`
  3. DBSERVER=127.0.0.1
  4. DATABASE=wordpress
  5. USER=root
  6. PASS=789789
  7.  
  8. unalias rm 2> /dev/null
  9. rm $FILE 2> /dev/null
  10. rm $FILE.gz 2> /dev/null
  11. mysqldump --opt --user=$USER --password=$PASS $DATABASE > $FILE
  12. gzip $FILE
  13. echo "$FILE.gz was created"
  14. ls -l $FILE.gz
  15.  
  16. unalias rm 2> /dev/null
  17. rm $FILE 2> /dev/null
  18. rm $FILE.gz 2> /dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement