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 ?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With