mysql backups

RobRob Detroit, MI
edited November 2003 in Science & Tech
Hey,

Anyone know of a good mysql backup routine for a live database dump?

The one I'm using now is kinda a PITA to recover from.

It needs to be automated with cron, I'm backing up every 30 minutes.

Comments

  • a2jfreaka2jfreak Houston, TX Member
    edited November 2003
    I believe DOSMAN started a thread on this once and Shorty answered him. I'm sure you can find it if you use the search term "sql" and the username "DOSMAN." Hope that helps.
  • RobRob Detroit, MI
    edited November 2003
    Thanks for pointing out my lazyness with 'search' ;)

    I'll take a peek and see what I can dig up.
  • a2jfreaka2jfreak Houston, TX Member
    edited November 2003
    I wasn't trying to imply you were being lazy . . . actually I was being lazy by not searching :) Sorry if I came off as rude, I didn't mean to.
  • RobRob Detroit, MI
    edited November 2003
    nope :)

    BTW, I didn't find it.

    What I'm doing now works, but it creates files for every table in every database, I would like to have something geared more twards a complete disaster recovery but it works for now.

    Currently, I'm dumping the entire DB every 1/2 hour into a directory in /var/lib/mysql_dumps
    then, rsync'in /var and /etc to a secondary drive 10 minutes after the sql dump occurs. I'm sitting here trying to decide if I need to rotate them, or not. The sql dumps are date taged and rotated every 5 days, but the /etc and /var files are not.

    Then plan is then to do a off-site backup over a ssh tunnel to an encrypted archive twice a day, noon and midnight. That's fairly reasonable coverage if a tornado comes and blows the datacenter away, or terrorists blow it up cause its a backbone and communications hub.

    I dunno what I want, gosh its so much easier designing backup routines for other people ;)
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited November 2003
    Rob, talk to Thom because we do live dumps of this very site nightly, and it's automated. He set it up, I'm not too sure how it works though.
  • a2jfreaka2jfreak Houston, TX Member
    edited November 2003
    Well, if you didn't find it then perhaps I was wrong about it being what you wanted. I thought doing a dump was, well, doing a dump. ;D

    Anyway, here's the link I found. http://short-media.com/forum/showthread.php?s=&threadid=4378&highlight=mysqldump

    If that isn't the answer to your question then I apologize for confusing the issue.
  • RobRob Detroit, MI
    edited November 2003
    Thats about what I'm doing now, but then I would have to compress it and rotate it myself.

    I might write up a little bash script for that, if I can't find someone that already has done it ;)

    Thanks for looking, I dunno why I couldnt find that result
Sign In or Register to comment.