This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need tool for export/import of database

 
johnny zee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
johnny zee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could just do a Runtime.exec() to run the particular dump utility, couldn't you?
 
johnny zee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul, I need direct programmatic control, and I need the source so I can adapt it to my specific needs if necessary.

 
Lukas Eder
Ranch Hand
Posts: 48
5
Java Oracle Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flyway is a fine database migration tool:
http://flywaydb.org

I'm sure it will be able to import / export your DDL and data the way you need
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic