Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to archive on another server? 1

Status
Not open for further replies.

benlinkknilneb

Programmer
May 16, 2002
590
US
Hey all,

I have an application that uses a locally-installed MySQL database to store records from our shop floor's production lines. However, for reasons out of my control, the computer is in a very dangerous spot. I'd like to have a script back up the data to my server on a regular basis (maybe every 5 minutes), essentially just getting the new records (I can tell by timestamps) from the db and inserting them into the server's db. Is there an easy way to do this or am I looking at a lot of scripting? Both systems are ubuntu linux, MySQL 5.

Ben
Windows isn't the answer; it's the question. NO is the answer.
 
There are several ways to approach this.

Database replication.

Or

Add a user to the local MySQL db that can access all of the databases remotely (at least read access from the other machine). Run mysqldump from the secondary machine and then import the records. If your tables are large, you'll need the disk space to handle this and it's slower than replication.

I just set up two replication servers last week, trust me, it's a snap. I'd practice in a virtual machine first to make sure you understand what's going on (binary logs and such).

Mark
 
That's a good tutorial, Mark. Thanks for your help.

Ben
Windows isn't the answer; it's the question. NO is the answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top