Backing up and restoring an Hsqldb database using java code

I am new to the Hsqldb database. I want to know how to backup and restore the hsqldb database through java code. Please offer an answer.

+4
source share
1 answer

If you want to back up while using the database, you use the SQL command as follows:

BACKUP DATABASE TO ...

To restore the database, you use the main () method for org.hsqldb.tar.DbBackup or org.hsqldb.tar.DbBackupMain (version 2.3.2 or later) depending on the version of HSQLDB.

The commands are explained here:

http://www.hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_backup

+1
source

All Articles