Gentoo Archives: gentoo-user

From: kashani <kashani-list@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Database migration software
Date: Fri, 05 Jan 2007 23:01:46
Message-Id: 459ED7BC.7070107@badapple.net
In Reply to: [gentoo-user] Database migration software by "Jerônimo Backes"
1 Jerônimo Backes wrote:
2 > Hi. I have a small database (100 tables) in firebird and want to migrate
3 > SOME data of it to a postgresql database. The latter database serves to
4 > a different purpose, so I just have to migrate specific columns of
5 > specific tables from the former database.
6 >
7 > Is there any app that can do that job? If not, I think I should create
8 > one...
9
10 The easiest way is to use your favorite language and output CSV files of
11 the data you want to import. Then take the files and import them into
12 the new database. In Mysql it would look like this and I'd expect
13 postgres to have similar tools.
14
15 mysql -u root -p
16 LOAD DATA LOCAL INFILE '/firbird.csv'
17 INTO TABLE new_table
18 FIELDS TERMINATED BY ','
19 LINES TERMINATED BY '\n'
20 (column_name1, column_name2, column_name3);
21
22 kashani
23 --
24 gentoo-user@g.o mailing list