In my java project, i want to use HSQLDB database for my application so i am studying HSQLDB, i just want to know is it possible to backup and restore HSQLDB database from within application or from outside of application ?
3 Answers
Yes it is possible to take backup of HSQLDB database from HSQL Database Manager i.e. Swing GUI provided by HSQL for database management. Follow the instructions step by step and you will have the backup of your database in encrypted format,i have also taken backup using java code as well,but first of all lets take a backup using HSQL Database Manager.
STEPS
Go to the folder of your HSQLDB database, in my case it is hsqldb-2.3.1.
Locate the bin folder of HSQLDB i.e. hsqldb-2.3.1\hsqldb\bin.
In bin folder you will find batch files providing GUI for database management of HSQLDB.
Run the batch file named runManagerSwing.bat, a GUI will open titled "HSQL Database Manager".
Connect to your database.
Fire the following query for taking backup:
BACKUP DATABASE TO <filename with entire path> BLOCKING
for example,
BACKUP DATABASE TO 'C:\Users\admin\Desktop\BAQCKUP\Maximus.tgz' BLOCKING
A backup file will be generated at the specified path. Make use of the above query in your java code as well and it will work.

- 502,043
- 27
- 286
- 360

- 665
- 11
- 26
How to Take Backup and Restore :
Backup :
Your Path> java -cp hsqldb-2.3.2.ja r org.hsqldb.lib.tar.DbBackupMain --save tardir/backup1.tar D:\opt\db\testdb
Restore :
java -cp hsqldb.jar org.hsqldb.lib.tar.DbBackupMain --extract tardir/backup.tar dbdir

- 79
- 4
Yes it is possible to backup and restore HSQLDB database from within application or from outside of application.

- 24
- 1
-
1@Conejo Perez,Will you please provide guidelines or some way to backup and restore HSQLDB ? thank you. – FullStack Jan 13 '14 at 05:49