daily pastebin goal
35%
SHARE
TWEET

Untitled

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