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

Written By
append data to existing database
February 23, 2010 11:02AM
February 23, 2010 11:11AM
February 23, 2010 11:24AM
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.