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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Dump information into compatible input commands - Help!

Status
Not open for further replies.

Lenny213

Technical User
May 15, 2006
1
0
0
GB
Hi,

I am rebuilding a system and all I have is the php files and an old dump.

Unfortunately the dump file data is not in a compatible format for my database to accept it as a copy and paste.

I don't want to have to manually input all of the data again.

Is there any way I can get the data into a new data base easily?

If I cut and paste what's in the dump, I get a syntax error at the first digit.

Here's an example of the data I need to get in (from the old dump):

3 IT Department t 2003-11-18 19:30:56.806108 2004-01-26 16:42:32.330953 f 2003-11-18 19:30:56.806108
2 HR t 2003-11-18 19:30:53.85686 2004-01-29 14:45:38.020966 f 2003-11-18 19:30:53.85686
4 Sales t 2003-11-18 19:30:59.353416 2004-01-29 14:45:46.591106 f 2003-11-18 19:30:59.353416
1 Marketing t 2003-11-18 16:56:02.292023 2004-01-29 14:45:52.831915 f 2003-11-18 16:56:02.292023
5 Service t 2003-11-19 12:11:19.993368 2004-01-29 14:46:00.140934 f 2003-11-19 12:11:19.993368
6 Corporate t 2003-11-19 12:12:18.193393 2004-01-29 14:46:16.300815 f 2003-11-19 12:12:18.193393
\.

Any ideas?

Thanks a lot in advance.

Lenny
 
using the console program psql - usually is enough (if no large objects are used)

psql DB_NAME < dump.sql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top