Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- DATE=`date +%Y-%m-%d-%H-%M-%S`
- LOCAL_BACKUP_DIR="/var/www/backup"
- DB_NAME="xxxxxxxx"
- DB_USER="xxxxxxxxx"
- DB_PASSWORD="xxxx"
- table=$1
- ############### Local Backup ########################
- 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