- #!/bin/sh
- # Run mysqldump to create backup file.
- # We'll retrieve using cron from remote workstation.
- # Create a filename concatenating the database name, the date
- # and file extensions indicating a compressed sql dumpfile.
- BFILE_1=/db_backup/wordpress_$(date +%Y%m%d).sql.gz
- # We'll pipe the output of mysqldump into gzip at its highest
- # compression setting (-9) and then out to the filename we created.
- # Creating the .my.cnf configuration file means we don't have to
- # manually provide the MySQL connection password.
- mysqldump -u root wordpress | gzip -9 > $BFILE_1
SHARE
TWEET
Untitled
a guest
Jun 4th, 2010
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
