Databases and File Storage Discuss database applications like mySQL and Postgres or other methods of storing data on the server.

Reply
 
Thread Tools

  #1  
Old 01-31-2007, 10:17 PM
mhackl's Avatar
mhackl mhackl is offline
TAZ Regular
 
Join Date: Sep 2006
Admin Experience: Beginner
Posts: 52
mhackl is on a distinguished road
Default Mysql: database to database transfer

I need a script that can incrementally transfer all the data from one MySQL database to another. That's my first objective, second is to be able to schedule it.

What I am trying to do is create a second (backup) database for my Vbulletin website that will be updated automatically during off-peak hours. This would create a twin database that I could hotswap in times of trouble by changing three values in my VB config file.

The key is that it has to be incremental to accommodate a large database and small import thresholds. What I'm looking for is something like the BIGDUMP script but for a DB to DB transaction.

This solution could already exist and I wouldn't know. PHP and MySQL are well outside my realm of understanding, so any info you could provide would be greatly appreciated.
Reply With Quote
  #2  
Old 01-31-2007, 10:35 PM
C1ay's Avatar
C1ay C1ay is offline
TAZ Regular
 
Real Name: Clay
Join Date: Jan 2007
Admin Experience: Advanced
Location: 33.78N 84.66W
Posts: 37
C1ay is on a distinguished road
Default
Search on MySQL replication. It's probably come up in the forums at vbulletin.org so you might look there for any caveats related to vb. Otherwise MySQL is covered in the manual.
__________________
Clay

"There are only 10 kinds of people in the world --
.....Those who understand binary, and those who don't"
Reply With Quote
  #3  
Old 04-07-2007, 11:39 PM
Rockatteer's Avatar
Rockatteer Rockatteer is offline
Tazmanian
 
Real Name: Rocky
Join Date: Apr 2007
Admin Experience: Advanced
Location: Cyberspace
Posts: 2,417
Rockatteer is a name known to allRockatteer is a name known to allRockatteer is a name known to allRockatteer is a name known to all
Default
I do this with my database.. In fact I have about 3 "hot" copies of the database (daily, monthly, yearly) as well as regular offline backups.

I use the below mysql script, which empties out the second database and then copies the tables from your main database... it works on table at a time.. I don't know if theres any other way of copying a database... lord knows I'm no expert at this.

TRUNCATE `second_database_name`.`ipb_spider_logs`;

INSERT INTO `second_database_name`.`ipb_spider_logs` SELECT * FROM `First_database_name`.`ipb_spider_logs`;


replace the second and first database names with the actual names of your database.

Then repeat these lines for each table of your database.
Reply With Quote
Reply

  Admin Zone Forums > The Development Zone > Databases and File Storage





Currently Active Users Viewing this Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
transfer a database from windows to Linux ? LucieV Servers and Hosting 5 10-07-2006 11:49 AM
Porting a mysql database to a new server w0lv3r1ne Databases and File Storage 2 08-16-2006 10:33 PM
Moving Server - MySQL Database Backup never works L.G.A Servers and Hosting 3 01-19-2006 01:44 PM
Installing MySql Server + Database Jorrit787 General Programming Discussions 2 12-19-2005 11:23 PM


 

All times are GMT -4. The time now is 02:50 PM.


Powered by: vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Page generated in 0.04742694 seconds with 13 queries
The Admin Zone copyright 2003-2014 All Rights Reserved. Content published on The Admin Zone requires permission for reprint.