MySQL Forums
Forum List  »  Data Recovery

append data to existing database
Posted by: Kevin Hall
Date: February 23, 2010 11:02AM

I take a dump of my data mysqldump -q -p$DB_PWD -u $DB_USER -h $DB_HOST $DB_NAME > MyDataFile.sql
my goal is to build an archive server. So say the database contains data from 2004 but if I load the file normally with mysql -u User -pPass Database < MyDataFile.sql

This will overwrite all data and recreate the database. What I need is to append the data on top of what is there. So that I can keep 2004 and add the new file. The databases are identical in structure. I am using mysql Ver 14.7 Distrib 4.1.8, for pc-linux (i686). I would like to do this without replicating the data across or dumping all individual tables I am dealing with millions of records so inserting the rows onto the new database is not an option unless it can be scripted.

Thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
append data to existing database
7433
February 23, 2010 11:02AM
3894
February 23, 2010 11:11AM
2853
February 23, 2010 11:24AM
2526
February 26, 2010 10:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.