Page 1 of 1

[Solved] Restore from Backup

PostPosted: Fri Aug 30, 2019 6:23 am
by gkick
Not sure if this? is the right section of the forum.

Firm believer in backup. In my learn about BASE HSQL db I have a Utilities form with buttons.
The database is backed up automatically via checkpoint, set log files log size and a button to run checkpoint defrag, all working nicely.
Reading the doco it appears the only way to restore from a backup is via decompress, copy paste or by using java
java -cp hsqldb.jar org.hsqldb.lib.tar.DbBackupMain --extract tardir/backup.tar dbdir
For me Java is an island of Indonesia which I do not know either, so my question is, is it possible to run this command from a button rather then the command prompt?
Anyone having an example ?

Re: Restore from Backup

PostPosted: Fri Aug 30, 2019 5:02 pm
by Sliderule
Review the HSQL Database documentation at:

So, for example, you could, from within OpenOffice / LibreOffice Base, from the Menu:

Tools -> SQL...

enter a command like:

Code: Select all   Expand viewCollapse view
-- Change what is between single quote to the directory you want the backup to be written to
-- Because it just ends with a forward slash,
-- the backup file name   Will be appended with a TIMESTAMP . . . making the file names unique


You can use any any COMPRESSION utility, to extract the four files, and, replace them in your DATA file.

I hope this helps, please be sure to let me / us know.


Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.

Re: Restore from Backup

PostPosted: Fri Aug 30, 2019 5:28 pm
by gkick
Hmm, the doco has nothing on restore from backup other then manually or via java script, so I guess restoring the latest backup via button is a no go.
But thanks anyway.