This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes DB Backup - MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DB Backup - MySql" Watch "DB Backup - MySql" New topic

DB Backup - MySql

yaron re

Joined: Jun 29, 2007
Posts: 7
How can I create DB Backup to a dump file or zip file from java code?
I can only create "sql" files. while the file i need is "zip" or "dump".
Is there any way doing that???
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Simplest way would be turn it into a two part process:
Take the .sql file you have produced and run it through a zip file creation process.

here is instructions to get you started with zip file creation:
Creating a ZIP file
I agree. Here's the link:
subject: DB Backup - MySql
Similar Threads
Using ant script for creating DB dump and restoring
Back Up & Restore Database
Incremental filename script
Embedding MySQL Database in Java Application
Backing up database through java