Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Shell script to backup the affiliate production database and push it to an off-site server
- CURRENTDATE = $(date +"%Y_%m_%d-%H_%M")
- USER = "production"
- PASSWORD = "mypass"
- DATABASE = "mydb"
- SAVEDIR = "/backup"
- BACKUPFILE = "$DATABASE_prod_$CURRENTDATE.sql"
- # backup the database
- mysqldump -c -e -n -t -p --user=$USER --password=$PASSWORD --default-character-set=utf8 DATABASE > $SAVEDIR/$BACKUPFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement