Guest User

Untitled

a guest
Dec 29th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. DATE=`date +%Y-%m-%d-%H-%M-%S`
  4. LOCAL_BACKUP_DIR="/var/www/backup"
  5. DB_NAME="xxxxxxxx"
  6. DB_USER="xxxxxxxxx"
  7. DB_PASSWORD="xxxx"
  8. table=$1
  9. ############### Local Backup ########################
  10.  
  11. mysqldump -u $DB_USER -p$DB_PASSWORD $DB_NAME --tables $table | gzip > $LOCAL_BACKUP_DIR/$DB_NAME-$DATE.sql.gz
Add Comment
Please, Sign In to add comment