how to backup and restore database using java

how to backup and restore database using java

View Answers

December 8, 2009 at 2:27 PM

Hi Friend,

Try the following code:

import java.util.*;
import java.io.*;
public class BackUpSql {
public static void main(String[] args) {
try {
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /c start C:\\ab.bat");
System.exit(0);
}
catch(Exception ex){
ex.printStackTrace();
}
}
}

Here is the ab.bat:

set path=%path%;C:\Program files\MySQL\MySQL Server 5.0\bin;
mysqldump -uroot -proot register>C:\back.sql

where root is the username and password and register is the database.

For more information, visit the following link:

http://www.roseindia.net/mysql/mysql_backup_restore.shtml

Thanks









Related Tutorials/Questions & Answers:
how to backup and restore database using java - Swing AWT
how to backup and restore database using java  sir my project is to backup and restore my datas using java so i want to know how to backup and restore databases using java give ur ideas and suggestions to me immediately  
database backup and restore using java - JDBC
database backup and restore using java  Hi... I have MS Access 2000 database.I want to backup and restore the db using jdbc.What's the procedure for that. Thanks in advance
Advertisements
database backup and restore
database backup and restore  hi i m able to take backup through java code but i m unable to restore the same file through the restore code . please provide me some suggestion
oracle database backup using jsp
oracle database backup using jsp   I want to take the backup... a backup of the database is stored in one of my local drives.Is it possible to do this task? If possible how can it be done
In this section you will learn how to rename MySQL database.
_TO_REPLACE_2 a) Take dump and restore into new database Take the backup of database using mysqldump utility as mentioned below: Use the following command to backup...How to rename MySQL database? In this section we will learn the safest method
how to take backup of phone to pc using java code
how to take backup of phone to pc using java code  i want to take the backup of phone data in my pc and also provide the restore functionality,and i want to do it using java program,so can anyone help me
How to Restore The Lossed data in MYSQL database after the System is formatted
How to Restore The Lossed data in MYSQL database after the System is formatted  How to Restore The Lossed data in MYSQL database after the System is formatted
ModuleNotFoundError: No module named 'jenkins-backup-restore-cli'
: No module named 'jenkins-backup-restore-cli' How to remove the ModuleNotFoundError: No module named 'jenkins-backup-restore-cli' error? Thanks...ModuleNotFoundError: No module named 'jenkins-backup-restore-cli'  Hi
ModuleNotFoundError: No module named 'jenkins-backup-restore-cli'
: No module named 'jenkins-backup-restore-cli' How to remove the ModuleNotFoundError: No module named 'jenkins-backup-restore-cli' error? Thanks...ModuleNotFoundError: No module named 'jenkins-backup-restore-cli'  Hi
Backing Up and Restoring A MySQL Database
and Restoring A MySQL Database This tutorial explains the how to backup and restore the MySQL Database. Databases are used to store large amount of precious... hardware or software failures  backup data can be used to restore the Database
Database backup
Database backup  I am developing c# application in which i am using Microsoft Access database (OLEdb connections). I want to take backup of database.... (adsbygoogle = window.adsbygoogle || []).push({}); How can i tae
Backing Up and Restoring A MySQL Database
the Database. Here is the video tutorial of: "How to backup and restore MySQL... Up and Restoring A MySQL Database This tutorial explains the how to backup and restore the MySQL Database. Databases are used to store large amount
how to take iphone backup using itunes
how to take iphone backup using itunes  Hi, Can anyone please tell me how to take iphone backup using itunes..?   You can find the details on apple website as well... anyhow i am giving you some tips as follow... How
PHP mysql database backup script - PHP
PHP mysql database backup script  How can i get the database backup using PHP mysql database
how to backup files and folder with Java
how to backup files and folder with Java  Does anyone know to create a backup with java?. backup files and folders from my computer to an external...(originalFile.getCanonicalPath() + ".backup"); originalFile.renameTo(backupFile
Backup MySQL Database - JSP-Servlet
Backup MySQL Database  Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database
php backup database script - PHP
php backup database script  please post the backup database script in PHP. Thank u very much
MySQL restore function in java - JDBC
MySQL restore function in java  I would like to import to a database .sql file. It is possible with the use of mysql administrator, however I would like to do the same with the use of java.Is it possible?If yes, how to do
restore all mysql database:cPanel MYSQL 5.1 to 5.5
restore all mysql database:cPanel MYSQL 5.1 to 5.5  restore all mysql database:cPanel MYSQL 5.1 to 5.5
ModuleNotFoundError: No module named 'django-database-backup-to-git'
: No module named 'django-database-backup-to-git' How to remove the ModuleNotFoundError: No module named 'django-database-backup-to-git' error...ModuleNotFoundError: No module named 'django-database-backup-to-git'  
ModuleNotFoundError: No module named 'django-database-backup-to-git'
: No module named 'django-database-backup-to-git' How to remove the ModuleNotFoundError: No module named 'django-database-backup-to-git' error...ModuleNotFoundError: No module named 'django-database-backup-to-git'  
How to insert dynamic textbox values into database using Java?
How to insert dynamic textbox values into database using Java?  Hi I am trying to insert dynamic textbox values to database, my jsp form have 2... these dynamic textbox values to database(Oracle 11g)...Please help me out. I have
Learn how to take MySQL Backups and restore the same.
Learn how to take and then restore the MySQL database backup. You can use mysqldump utility to take the backup of MySQL database and tables with or without data as per your need. There are many ways to take the back of your database
How to Retrieve Data from the database and write into excel file using Java
How to Retrieve Data from the database and write into excel file using Java  Hi, I am trying to develop an small application where i trying to retrieve Data from the database and store the details in excel file. Please can
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access and i wants to open this Picture On Web Browser using Java Servlet anybody can
How to save database data into excelsheet using hibernate
How to save database data into excelsheet using hibernate  How to save database data into excelsheet using hibernate
how to connect to database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
database connection by using java bean
database connection by using java bean  i need a code for bean class to connect to mysql database. subsequently to use dis bean class whereever i need 2 connect 2 database
I Want to take mqsyl batabase backup using jsp
I Want to take mqsyl batabase backup using jsp   I was develop web portal using jsp and servelt. I need to take backup my MySQL database and restore another one MySQL database.   import java.util.*; import java.io.
How to create bar chart using database values
How to create bar chart using database values  How to create bar chart using database values i.e excellent,good,average fields using jsp?It is like opinion poll.I want to show how many votes are came for excellent,good,average
how to save uploaded image in database using javascript
how to save uploaded image in database using javascript  Please can you tell me how to store uploaded image in database using java I'll use...; Now i want to store it on database...ADS_TO_REPLACE_1 Please help me Thanks
how to retrieve image from mysql database using java and show it in HTML img tag ?
how to retrieve image from mysql database using java and show it in HTML img tag ?  how to retrieve image from mysql database using java and show it in HTML img tag
how to store image file and videofile in ms access database using java? - JDBC
how to store image file and videofile in ms access database using java?  how to store image file and video file in ms access database using java
How to export data from database to excel sheet by using java in standalone project
How to export data from database to excel sheet by using java in standalone project  How to export data from database to excel sheet by using java in standalone project
how to take a backup of a table in sql
how to take a backup of a table in sql  how to take a backup of a table in sql?   SQL BackUp Table example
how to insert data into database using jsp & retrive
how to insert data into database using jsp & retrive  Hello, I have created 1 html page which contain username, password & submit button. in my oracle10G database already contain table name admin which has name, password
how to create database and table using jsp
how to create database and table using jsp  hi frnds...., i want to create database and table in mysql using jsp.... i have an registration form(name... for each user to store their details.. so pls help me how to create individual
how to display a table from database using servlet
how to display a table from database using servlet  how to display a table with values from servletpage   Hi Friend, Please go through the following link:ADS_TO_REPLACE_1 http://roseindia.net/jsp/servlet-jsp-data
How to delete the row from the Database by using servlet
How to delete the row from the Database by using servlet  Dear Sir/Madam I am trying to delete the one user data in the Oracle SQL server database...: Delete row from database using servlet   In that link solution
How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java
How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java  How To Store... and then retrieve them in image gallery using java
Java backup pst file
Java backup pst file  Hello!! i need some help please. Im new in Java. How can i create a java program to backup any files and folders (like PST files)in my computer at a specific time
how to insert data in database using html+jsp
how to insert data in database using html+jsp  anyone know what... and database name. Here machine name id localhost and database name..."; // declare a connection by using Connection interface
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  how to insert check box value to the database using jsp my code is (adsbygoogle = window.adsbygoogle || []).push({}); <link href="font&colors.css
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert check box value to the oracle database using jsp? I want to create hotel's... into database. (adsbygoogle = window.adsbygoogle || []).push
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert check box value to the oracle database using jsp? I want to create hotel's package. where the admin will select the activities to insert in the PACKAGE table. I
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array  i am using netbeans 7.0 ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use
how to store multiple values from drop down in database where i am using java struts 1.3
how to store multiple values from drop down in database where i am using java struts 1.3  hii, i am coding a form where i need a keyskills attribute... is displaying.. i need code in java so that it takes multiple values
How to export data from database to excel sheet by using java swing in standalone project - Java Beginners
How to export data from database to excel sheet by using java swing... database to excel sheet by using java swing in standalone project.I get solution from... solution by using java swing programming. please send me reply to me

Ads