a guest May 31st, 2017 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # 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
RAW Paste Data