How to create my own VB backup program for a remote MySQL DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Astra

    How to create my own VB backup program for a remote MySQL DB

    Hi All

    I understand that the basic principles to create a TCP/IP backup program for

    a remote MySQL DB are:

    a) Query/retrieve the schema.

    b) Query/retrieve each table and create inserts for each row of data.

    The way I want to do it is even more basic, as I know what my schema is so I

    only need to reterieve and create the insert rows to put into my backup text

    file, which is basically a large DDL.

    The problems that I am experiencing are I want to keep the schema in an

    external text file so that I'm not storing it in the actual app and I

    thought I would also have another external file to store each 'select * from

    tablex' query.

    Is this a good way of doing it?

    How would I merge the results together to make a new (and 3rd) external text

    file backup?

    Any help is appreciated.

    Rgds

    Robbie




    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
  • Bill Karwin

    #2
    Re: How to create my own VB backup program for a remote MySQL DB

    Astra wrote:
    [color=blue]
    > The problems that I am experiencing are I want to keep the schema in an
    > external text file so that I'm not storing it in the actual app and I
    > thought I would also have another external file to store each 'select * from
    > tablex' query.
    >
    > Is this a good way of doing it?[/color]

    Have you considered using "mysqldump --host=servername "?
    See http://mysql.he.net/doc/mysql/en/mysqldump.html

    Assuming there's some reason that using the standard MySQL backup tool
    isn't sufficient, I would recommend against separating the backups into
    different files. Or at least make sure your backup tool uses some
    filename conventions or some other means to associate the backup files
    with one another to reconstitute the full backup. Otherwise you may
    risk inconsistent data, if you restore data from two different backup dates.

    Regards,
    Bill K.

    Comment

    Working...