Mysql Database backup in remote server.

Discussion in 'Programming/Scripts' started by msaravanan, Mar 25, 2009.

  1. msaravanan

    msaravanan New Member

    Dear All,


    We are using mysql database in CENTOS server and Fedora server. All are mysql 5.0.

    We have 2 server in 2 different locations. Now we want to take backup of mysql database from 1 end and need to transfer this to another end and need to extract the data and use it.

    In 1 end we dont have the fixed ip(Global ip). So can i write shell script to make back and trasnfer to any ftp location from 1 end. In another end can read from ftp and extract the data.

    Now need to do the process once in 30 mts interval.

    How to do this can any one help me to fix this.

    Very urgent.

    Thanks & Regards
    Saravanan.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I'd get a hostname from dyndns.org and set up database replication.
     
  3. make-fun

    make-fun Member

    If, for some reason, you can't do what falko suggested and have PHP as well as access to the crontab on Server2 you should look into the cURL-Library. With this you can do downloads on Server2(no fixed ip) connecting to Server1(fixed ip), by placing a PHP-Script on Server2.

    It works well, but obviously with the limitations of being a file transport via a ftp connection.

    cURL also allows for other types of connection by the was

    http://php.net/manual/en/book.curl.php


    Check your PHP-Info to see if you got cURL support enabled.

    Cheers
     

Share This Page