Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Mysql DUMP
  2. #!/bin/bash
  3.  
  4. user="user"
  5. password="pass"
  6. host="localhost:port"
  7. db_name="db_name"
  8. backup_path="/home/ubuntu/path/"
  9. date=$(date +"%d-%b-%Y")
  10. # Set default file permissions
  11. umask 177
  12. mysqldump -u $user $password -h $host $db_name > $backup_path/$db_name-$date.sql
  13.  
  14. # Get current date formated
  15. date=$(date +"%d-%b-%Y")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement