Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to backup and restore HSQLDB database?

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 ?

like image 569
FullStack Avatar asked Jan 13 '14 05:01

FullStack


People also ask

Is HSQLDB in-memory?

HSQLDB (HyperSQL DataBase) is the leading SQL relational database system written in Java. It offers a small, fast multithreaded and transactional database engine with in-memory and disk-based tables and supports embedded and server modes.

What does HSQLDB mean?

HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards.


1 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

  1. Go to the folder of your HSQLDB database, in my case it is hsqldb-2.3.1.

  2. Locate the bin folder of HSQLDB i.e. hsqldb-2.3.1\hsqldb\bin.

  3. In bin folder you will find batch files providing GUI for database management of HSQLDB.

  4. Run the batch file named runManagerSwing.bat, a GUI will open titled "HSQL Database Manager".

  5. Connect to your database.

  6. 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.

like image 58
FullStack Avatar answered Sep 21 '22 08:09

FullStack