Help! IntelliJ lost history

Answered

I have a real problem here.  IntelliJ seems to have lost my local history.

Initially my problem was that although the various versions of the file in the "differences" window (Version Control > Local History > Show History) were showing in the bottom pane, both left and right versions of the file were shown as "File content is not available (read-only)".

Quitting and relaunching IntelliJ seems to have made the history work again...but only from that point on!  i.e. I seem to have lost the history for my entire project.

Is there any way I can get my history back?

This has suddenly happened in the past few days, and I have not changed anything in my project setup since the last time it worked.

12 comments
Comment actions Permalink

Most likely it's not possible to get the history back. Note that the local history is not a replacement for a proper VCS system, and we don't make any guarantees regarding how long the data in the local history is stored.

0
Comment actions Permalink

Thanks Dmitry.  Somewhat disappointing that such an important feature is not more reliable.  Yes, I have VCS; but I'm not interested in using it to replace local history!  Is there some way that users could back up the local history?  Then at least we would only lose a certain amount of it...

0
Comment actions Permalink

Hi there,

You can try searching for LocalHistory folder and back it up when required, but I just do not think that it will work on it's own (I mean -- I think it's linked to other indexes/caches as well, so preserving (by backing up) local history only quite likely will not help if other indexes are damaged/invalidated).

Check this document for possible locations where local history is stored: IDEA files locations

For example, on Windows 7 it should be C:\Users\USERNAME\.IntelliJIdea11\system\LocalHistory

-1
Comment actions Permalink

Hmmm, OK well it was worth a try.  Thanks anyway

0
Comment actions Permalink

IntelliJ IDEA no longer stores local history information in a separate folder; it's now stored together with our filesystem cache.

0
Comment actions Permalink

Maybe the latest IJ version 'does not store ANY history anymore' ?
I just had a blue screen of death, while having worked for hours on some code and IJ open.

After reboot I found my file back in time several hours.

I went to Local History and see 'no history'!!!

Jetbrains: is my IJ no longer protecting my work when my laptop crashes...? What happened to Local History and auto save?

I'm totally in despair about this, please respond

0
Comment actions Permalink

link https://intellij-support.jetbrains.com/docs/DOC-181 cannot be found anymore, I know it's an old thread but a very current problem

0
Comment actions Permalink

Local history could be lost on IDE caches corruption/invalidation. It is not guaranteed that time interval always be several days.

If you can provide the log file at the moment issue  happened I'll check if there are any errors.

0
Comment actions Permalink

I created https://intellij-support.jetbrains.com/hc/en-us/requests/1955199 and attached the logs, your help will be appreciated.

I enabled 15 second file save on idle option, that seemed not to be one (not a default?)

Is there no way to reliable journal and fsync user file-edits and to recover open files on crash like e.g. Microsoft word seems to do quite well in the comparable situation?

Or at least preserve the Local History after such crash (recover its indexes, make sure it regularily syncs to disk)

0
Comment actions Permalink

When possible the local history is always preserved for the period of retention (which is 5 days by default).

0
Comment actions Permalink

Then why is all history empty after a laptop crash/reboot...?

0
Comment actions Permalink

In log on the next after the crash IDE session there is a record that IDE had to rebuild it's virtual file system (due to it's corruption: 2019-01-23 18:11:30,888 [ 5968] INFO - ellij.vfs.persistent.FSRecords - Filesystem storage is corrupted or does not exist. [Re]Building. Reason: FS repository version mismatch) and so the local history had to be rebuilt also: 2019-01-23 18:11:32,312 [ 7392] INFO - .history.utils.LocalHistoryLog - FS has been rebuild, rebuilding local history...

Such things could happen unfortunately this is why the Local History should be not considered as 100% replacement of VCS or other means for saving your. I'm sorry for the issue.

0

Please sign in to leave a comment.