[Solved] Restore from Backup

Discuss the database features

[Solved] Restore from Backup

Postby gkick » Fri Aug 30, 2019 6:23 am

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 ?
Thanks
Last edited by gkick on Fri Aug 30, 2019 5:28 pm, edited 1 time in total.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
gkick
 
Posts: 263
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: Restore from Backup

Postby Sliderule » Fri Aug 30, 2019 5:02 pm

Review the HSQL Database documentation at:

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

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

BACKUP DATABASE TO 'C:/Users/gkick/Documents/' BLOCKING NOT COMPRESSED

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.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1242
Joined: Thu Nov 29, 2007 9:46 am

Re: Restore from Backup

Postby gkick » Fri Aug 30, 2019 5:28 pm

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.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
gkick
 
Posts: 263
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile


Return to Base

Who is online

Users browsing this forum: No registered users and 5 guests