Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

MYSQL Backup (See related posts)

// shell script to backu a mysql database

   1  
   2  #!/bin/sh
   3  
   4  RM=/bin/rm
   5  MV=/bin/mv
   6  TAR=/bin/tar
   7  GZIP=/bin/gzip
   8  CHOWN=/bin/chown
   9  
  10  DUMP=/usr/bin/mysqldump
  11  
  12  BDIR=/mnt/mrynas/backups/fogbugz
  13  
  14  DATE=`date +%Y%m%d`
  15  
  16  echo Dumping mysql database as
  17  echo $BDIR/mysql.$DATE.gz
  18  $DUMP --opt -c -e -Q mysql | gzip > $BDIR/mysql.$DATE.gz

You need to create an account or log in to post comments to this site.


Click here to browse all 5545 code snippets

Related Posts