LyXDamaged LyX File

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
mina_85
Posts: 3
Joined: Sun Jul 24, 2011 3:51 pm

Damaged LyX File

Post by mina_85 »

Hello,
i am using ubuntu 11.04
I was working on a LyX document (version of LyX 2.0.0.rc3), when all of a sudden rupture of the electrical current has occurred. I tried opening the document again, but LyX displays:

xxxxxxxx.lyx Is Not A readable LyX document.

Now, the document size is 0 byte. (knowing that I save my work)

What to do please? Is there a backup or a way to recover my work? really it is very difficult to do it again ...

thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Damaged LyX File

Post by meho_r »

If you haven't turned off autosaving in preferences, a backup file might be still present. Open folder where your damaged .lyx file is located, activate "Show Hidden Files" in Nautilus (View > Show Hidden Files, or Ctrl+H), and try to locate a .lyx file with tilde at the end, e.g., if your file is xxxxxxxx.lyx, backup should be xxxxxxxx.lyx~. Just delete tilde at the end, and open the document with LyX (you'll have to move or rename damaged file first, of course).
mina_85
Posts: 3
Joined: Sun Jul 24, 2011 3:51 pm

Re: Damaged LyX File

Post by mina_85 »

Even the size of xxx.lyx~ file is 0 byte...
i tried to open it with lyx, but the same error message is shown :(
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Damaged LyX File

Post by meho_r »

Hmmm, in that case I'm afraid there's not much you can do. But still, it is strange that both files are zeroed. I remember having problems like that on Ubuntu some time ago, the problem was related to ext4 filesystem and delayed allocation which, in case of power cut and similar interruptions caused opened files to turn to zero, deleting data. However, that issue should have been solved by now.

A suggestion for future work: install Dropbox (or, alternatively, you can use UbuntuOne if it's stable enough) and store your working projects in Dropbox folder, so that even in disasters like this one you have a chance to restore deleted files later. I've learned this the same way you just have: the worst possible.
mina_85
Posts: 3
Joined: Sun Jul 24, 2011 3:51 pm

Re: Damaged LyX File

Post by mina_85 »

Thank you meho_r,

i thought that i can do a recovering to my work (especially that i have saved it...),
but it seems that i have to re-write it :(


thank you for helping and advising me
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Damaged LyX File

Post by meho_r »

You can ask at Ubuntu forums, probably someone can give you an advice regarding file recovery in general. I know there are some tools like TestDisk and PhotoRec which are able to recover data, but I never used any of them. Best of luck.

M.
Post Reply