how should i duplicate my database?

Discussion in 'MySQL' started by darrens, Apr 15, 2007.

  1. #1
    Hi,

    Im running a database server (mysql).
    In the past few weeks i have had a lot of downtime on the server meaning my websites can work with out my database.

    Im about to purchase some more hosting and i would like to create a back of this database on the new host so that if my main database goes down i can quickly switch to the backup version.

    What is the best and most secure way to backup my database? it is changing on a minute by minute basis?

    Any suggestions?
     
    darrens, Apr 15, 2007 IP
  2. rupertValentino

    rupertValentino Peon

    Messages:
    735
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Put phpmyadmin on then goto Export --> save as file an then save the sql code on ur comptuer. then you can run that and it will create the tables on another database by clicking SQL and finding the document
     
    rupertValentino, Apr 15, 2007 IP
  3. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    darrens does the mysql service on the host go down or does the whole server go down? If the whole server goes down there's absolutely no point in buying another account, rather go for clustered failover service (choose wisely). If mysql fails then the host should see what breaks it.
     
    maiahost, Apr 15, 2007 IP
  4. Hopper

    Hopper Well-Known Member

    Messages:
    1,330
    Likes Received:
    96
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Sorry to hijack a thread but I wonder if Darrens is getting a similar problem to what I am?

    Does anyone know how I would go about cloning a database from one of my sites and moving it to another?

    I have tried the above and get problems with access because site1_database cannot be accessed by site2_database (I hope that makes sense?)

    Any help would be much apprecated.
     
    Hopper, Apr 15, 2007 IP
  5. darrens

    darrens Peon

    Messages:
    808
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    The issue with my present supplier isn't that bad but for saftey reasons i feel happier if i have my database in 2 places !

    As for phpmyadmin + export ... this would rely on someone manually doing this? is there not a way that everytime one database was edited the second cound be done at the same time (realtime)
     
    darrens, Apr 16, 2007 IP
  6. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You could write some php code to create a db backup but you are far better off just getting a decent host.

    Mine backs up everything offsite every day. If I delete a table by accident they can upload a backup within hours.

    I backup to my PC once a week as well.
     
    mad4, Apr 16, 2007 IP
  7. ScottDaMan

    ScottDaMan Peon

    Messages:
    461
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you have cpanel, click the backup icon and download the database. Then on the new account, upload the DB. Simple.
     
    ScottDaMan, Apr 16, 2007 IP