path32 wrote:Thanks for the reply,
Im trying to do,
Recover .backup from .data because my .backup. has lesser than .data
because when i open my database, all of my data are all erase
I will attempt to explain to you what I would do, BUT, I cannot guarantee it will be successful, since, it is very possible that the contents of your your
mydb.data and
mydb.backup files are the same, and, therefore, bringing back data from the
mydb.backup file will not result in any differences, unless, you have kept a SAFE copy of the
mydb.backup file.
Please carefully follow these steps:
- Shut down your OpenOffice Base files, and, server if running HSQL as a server. This means, there should be NO mydb.lck file.

- Keep / make safe copies of the following files on your computer:
- mydb.data
- mydb.backup
- mydb.properties
- mydb.script
- Use a text editor, such as Notepad, or whatever, to modify the contents of the mydb.properties file. Line 15 of the file ( at least on my 1.8.0.10 files ) has a line that says:
change it to:
That is, just change the no ( if that is the current content of the line ) to a yes .
- Rename ( change the file name ) of mydb.data to mydb.XXdata
The reason for the above is so the database engine ( HSQL ) will 're-create' the mydb.data file from the contents of mydb.backup ( this is what you said you wanted
) .
- Below download the zero byte file, mydb.data , place it in your folder with the other mydb.* files. Because it is one byte, the file is a 'dummy' file and will be overwritten with the contents of you mydb.backup after you start your database engine. Because this forum will NOT allow an attachment file with a file type of .data, you will have to rename the file below to: mydb.data
- mydb.odb
- Change the name of file from mydb.odb to mydb.data
- (1 Bytes) Downloaded 476 times
- Start your OpenOffice Base file. The above operation will be performed 'automatically' by the database engine ( hsqldb.jar ).
- You can now check to see if your Tables contains the data you think should be in them.
- Important step: If your database is now working as desired, you want to recover the database file space ( shrink the size of the mydb.data and mydb.backup files ). This is accomplished by:
From the OpenOffice Base file menu: Tools -> SQL...
enter the following command in the Command to execute box:
- Press the Execute button
- Press the Close button
- Shut down your OpenOffice Base file, and, make safe backups of the four HSQL files ( mydb.* )
- Let the forum know the outcome.

Just to repeat, the above will be successful, ONLY IF, the contents of your mydb.backup file actually contains 'clean' data, rather than a backup of 'bad' data from the mydb.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.