Advertisement
Guest User

Untitled

a guest
Aug 11th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/bin/bash
  2. start_time=`date +%s`
  3. echo "Document Root: $1"
  4. echo "target destination: $2"
  5. echo "mysql database: $3"
  6. echo "mysql user: $4"
  7. echo "mysql pass: $5"
  8. echo "domain name: $6"
  9. echo "rsync files to destination..."
  10. rsync -rpvv $1/ $2/
  11. echo "create database folder..."
  12. mkdir $2.dbtpl
  13. echo "dump database to database folder..."
  14. mysqldump -u **insertusernamehere** -p"**enterpassword or leave blank and enter at prompt**" --opt --flush-logs $3 > $2.dbtpl/$3.sql
  15. echo ""
  16. echo "complete"
  17. end_time=`date +%s`
  18. echo execution time was `expr $end_time - $start_time` s.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement