1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Do you backup your Website MySQL Database?

Discussion in 'MySQL' started by beyondsunny, Feb 17, 2006.

  1. sacx13

    sacx13 Active Member

    Messages:
    438
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #21
    I backup my site every night.

    I added a simple script in my cron.daily ...

    This is a part of the script who do the backup
    
    #!/bin/bash
    
    M="mysql --defaults-file=/home/backup/debian.cnf"
    MA="mysqladmin --defaults-file=/home/backup/debian.cnf"
    MD="mysqldump --defaults-file=/home/backup/debian.cnf"
    
    DATE=`date +%m-%d-%y`
    
    LOG=/home/backup/night-$DATE.log
    my_exit () {
       exit $1
    }
    
    
    # Test if the server is up and running.
    if ! $MA --silent ping >/dev/null; then
      my_exit 0
    fi
    
    
    $MD -t database > /home/backup/dump-$DATE.sql
    gzip -9 /home/backup/dump-$DATE.sql >> $LOG
    
    
    Code (markup):
    Regards
    Adrian
     
    sacx13, Mar 29, 2006 IP
  2. rick sample

    rick sample Peon

    Messages:
    310
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #22
    I make backups about once a month. This summer I plan to make a weekly backup though :)
     
    rick sample, Mar 29, 2006 IP
  3. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #23
    Thanks for the link. I'm going to check into that. ;)
     
    ResaleBroker, Mar 29, 2006 IP