Re: About Database Recovery

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: About Database Recovery

Jakub Mendys
Hi!

My db got corrupted today and I've spent 3 hours to find how to recover it. As I
haven't found any pice of code I have wrote it my own. Below you will find a
sample program to decompress the backup file:

import org.hsqldb.lib.*;

class x {
    public static void main(String[] args) {
        try
        {
        ZipUnzipFile.decompressFile("backup","data", FileUtil.getDefaultInstance());
        } catch (Exception e) {
        System.out.println(e.toString()); // Display the string.
        }
    }
}

compress and execute using commands like:

"C:\Program Files\Java\jdk1.6.0_24\bin\javac.exe" -cp "c:\appl\OpenOffice.org
3\Basis\program\classes\hsqldb.jar" x.java
java -cp .;"c:\appl\OpenOffice.org 3\Basis\program\classes\hsqldb.jar" x

This worked for me (my data file was corrupted and I have recovered all data
this way) .
Hope it helps.

Feel free to ask a question if you have any problem with my example.

Jakub Mendys
[hidden email]



------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
rob
Reply | Threaded
Open this post in threaded view
|

Re: About Database Recovery

rob
Dear Jakub,
thank you sending this post. I was looking for more than 3 hours to find how to recover a hsqldb backup file from an Libroffice Base application and I'm so grateful that you provided this code. Because I'm not very familiar with Java I couldn't have done it on my own. But with your help I recovered the application. Now I will switch the database from embedded to external, since this seems to happen to embedded databases in Libreoffice quite often.

Thank you again.

Robert