LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help recovering database file in open office (https://www.linuxquestions.org/questions/linux-software-2/help-recovering-database-file-in-open-office-460104/)

mifan 07-01-2006 04:35 PM

help recovering database file in open office
 
Last night, I was using open office when it decided to stop responding, so I did xkill and reopened open office. the data recovery saved me three hours of work, (three hours was the last time I had saved).

but today I was working all day, and I didn't save since last night. now open office has frozen again. this time, if I do the same thing, it will set me back an entire day's work. Is there a way to recover the file... perhaps it's stored some where in a temp folder... anyone know?

It is an open office database file. I checked the .openoffice dir in my home directory, and didn't see a .bak file for the database.

help recovering files greatly appreciated!!!

unSpawn 07-02-2006 05:04 AM

If the process is still running it still could have files open. First thing is finding the pid(s) of the process(es) using ps, pgrep or pidof. Now you could check if any of the filedescriptors in /proc/PID/fd/ has the file opened. You could also try and find those with the standard "lsof" tool. "lsof -p PID" should show open files for that process, or if you know the file is in a tempdir or say "/home/mifan" you could also do "lsof +D /home/mifan" to get a list of all opened files there.

mifan 07-06-2006 05:18 PM

thanks! I found the tmp file and saved it, but now I'm not sure how to add those back into the database...

I have a file with a bunch of lines that look like this:
/*C1*/SET SCHEMA PUBLIC
CONNECT USER SA
DELETE FROM "Table1" WHERE "ID"=197
INSERT INTO "Table1" VALUES(197,'name','DATA1')
INSERT INTO "Table1" VALUES(198,'name','DATA2')
... and so on.


All times are GMT -5. The time now is 06:33 PM.