This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need tool for export/import of database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Need tool for export/import of database" Watch "Need tool for export/import of database" New topic
Author

Need tool for export/import of database

johnny zee
Greenhorn

Joined: Sep 28, 2002
Posts: 7
Basically I just need a java library for exporting the database (schema and data) to a file, and being able to import that file again. I want to use it as a backup feature.

Preferably it should export to a runnable sql script (like mysqlfront's export feature).

It wouldn't be impossible to implement by myself but I am hoping something similar already exists.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

"johnnyzee",

You have already been asked (in this post) to change your display name to conform to JavaRanch standards.

This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Accounts with invalid display names are subject to closure.

bear
Forum Bartender


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Does it really have to be a Java library? What don't you like about the toos which come with the DB?
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
Originally posted by Dmitry Melnik:
Does it really have to be a Java library? What don't you like about the toos which come with the DB?

I agree, most databases have some kind of backup or replication feature. You could probably do it using Java but I think it would be horribly inefficient, unless your db is very small.


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
johnny zee
Greenhorn

Joined: Sep 28, 2002
Posts: 7
Apologies, I never noticed the post about changing the display name. After three days with no replies I never checked that thread again.

About the OT, I need programmatic control over the export/import functions. And since my program is java the functions should also be written in java.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You could just do a Runtime.exec() to run the particular dump utility, couldn't you?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

I never noticed the post about changing the display name.


OK, now you know. Please change your display name prior to your next post.

thanks
johnny zee
Greenhorn

Joined: Sep 28, 2002
Posts: 7
Paul, I need direct programmatic control, and I need the source so I can adapt it to my specific needs if necessary.

Bear, incidentally I had already changed it before my last post (as you will notice).
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

"johnny zee", please see the private message I just sent.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Need tool for export/import of database
 
Similar Threads
Content Export/Archiving
How to export and import from data from syabse database using jdbc
Duplicating data from remote database to local databse
need of schema export feature?
populate data from csv into oracle