mySQL: Backup\Dump entire database to a text file every hour?

Discussion in 'MySQL' started by amaze, Feb 23, 2007.

  1. #1
    Hi,

    On our server we currently use mySQL Admin (great product) on our windows 2003 server to backup a db daily. It stores the entire db in a text file. We need to automate this hourly but mySQL Admin doesn't allow that.

    How can we do this efficently and of course it needs to be reliable?

    Thanks :)
     
    amaze, Feb 23, 2007 IP
  2. pixel876

    pixel876 Guest

    Messages:
    293
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    pixel876, Feb 23, 2007 IP
  3. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    What something like a .bat file?
     
    amaze, Mar 2, 2007 IP
  4. bscdesign.com

    bscdesign.com Active Member

    Messages:
    681
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Can you do a cron job on windows 2003 servers?
     
    bscdesign.com, Mar 3, 2007 IP
  5. ArtInt

    ArtInt Active Member

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #5
    If you have system shedule service, you can create a task, and run a simple bat file
    mysqldump dbname --user username --pass=password > dumpfile.ext
     
    ArtInt, Mar 3, 2007 IP
  6. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Hi,

    Yes I can do that. One problem is "locking" the tables. Is it possible to perform a "mysqldump" withotu locking the tables much like an innotable dump?

    Thanks
     
    amaze, Mar 5, 2007 IP
  7. OneWebAve

    OneWebAve Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can also stand up a second MySql server and have them synchronize (cluster) so both are identical at all times. One is read/write for your site, and one is just write only for a backup copy.
     
    OneWebAve, Mar 7, 2007 IP
  8. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Yes this sounds a good way of securing data. Does mySQL allow this to be performed over the internet? For example if I have a server in a remote location for added security. If "write" only this wouldn't use too much b\w I doubt. Are there any issues using this method and lastly is it easy to set up replication of this kind (for example setting up HD raid is pain unless you start with RAID and not adding it at a later point?)

    Cheers :)
     
    amaze, Mar 7, 2007 IP
  9. OneWebAve

    OneWebAve Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I've done it over the Internet before, yes.

    It doesn't use much bandwidth, since you're just writing changes.

    Issues? I am sure there are, it took me a little while to figure everything out but otherwise worked fine.

    Check the MySql site and search for clustering, or any number of Google results, and you'll find more than you could imagine, I'm sure! :)
     
    OneWebAve, Mar 7, 2007 IP
  10. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #10
    Ok I will look into it! Looks a great way to backup data.

    Last Q. Is there any security issues with opening port 3306 on the firewall?
     
    amaze, Mar 8, 2007 IP