-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore from Backup triggered unnecessarily #9488
Comments
I have the same issue, this backup dialog pops up all the time. JabRef 5.9--2023-01-08--76253f1a7 |
Meanwhile, I found old leftover Edit: One of my next personal projects is Update info about backup manager and .sav and .bak files in docs |
Actually, in my case the backup is in the directory ./snap/jabref/2265/.local/share/JabRef/5.9--2023-01-08--76253f1a7/backups/ and for some reason it gets generated quite frequently. If I remove all the backups, start jabref, wait a few seconds, do a ctrl-q, then there is a backup again, and the warning, when I start next time. |
yes, this is intended. Since 5.8, JabRef creates a new backup every Only, if you find backup files somewhere in other folders, you probably should tidy them up. |
Have there been any changes to your library though? Is your library file shared to remote (online) devices via cloud? Edit: Sorry, gotta go offline now. Will be online again later today. |
No, the backups are created even without any active changes. The library is not shared. The problem is not with the existence of the backups, but with the waring, that jabref was not shut down cleanly (which is not true). It is a bit annoying having to start every session with clicking on "ignore backup". |
@jelasity To dig deeper into this: I assume, the .bib file was originally created by another tool (or manually)? |
Actually, the phenomenon has become less frequent these days. It still happens, but more rarely. For example, right now I'm not able to reproduce this. It probably depends on something I do but I'm not sure what exactly. The bib file has been in use for more than three years and I never edit it directly, only through jabref. It contains some 2000 entries. Most entries with linked pdfs, and also group information. My guess is that under some circumstances jabref feels it was not shut down properly when in reality it was. It might have to do with background processes (for example, maybe when I shut the OS down after cleanly closing the GUI but with jabref still in the background (eg choking on some big pdf or something)). If it happens again, I will collect the data you requested. |
@jelasity If you cannot find anything with 5.9, you could try the newest development version of JabRef instead. Maybe it helps. You can download it from here. Meanwhile, there have been some further improvements to the UI of the "Review Backup" dialogue, which now also shows a more sophisticated "entry preview" and the "bibtex source" tab. |
Please, in the case, it happens, please copy the
Thank you for that 🤩
When JabRef loads, it does a binary compare on the In the directory Please try the binary especially crafted for you - it is available at https://builds.jabref.org/pull/9680/merge/. |
Code comment: This is caused by
|
I tested this a bit, and it looks to me that the dialog is started only if two conditions are both met: the files differ and the bib file is older than the bak file. Now, I work at two locations and synchronize my working directories with rsync., but I do not synchronize the jabref directories (where the .bak files are stored, for example). But this should cause no problem because both computers have correct timestamps and so the timestamp of every bib file can only move forward, while the .bak files are not affected by rsync. If I synchronize while jabref is running, a newer .bak file can be written using the old data. However, I tested this too and jabref warns me that the library was modified, and I don't remember seeing that before. In any case, if this happens again, I now know where to look for causes, and I will get back to you. |
This is exactly the condition, JabRef implements. In other words: JabRef continuously writes .bak files. In case JabRef crashes, the written .bak file is newer than the saved .bib file. Then, the dialog appears. However, this dialog does not need to appear if there is no content difference. Note that we also implement "discarded" if a user discards new changes: #9361
Ah, yes. And this could be the reason of the warning? I need to think more of that. Keywords:
Thank you! |
I bumped into it again, and I debugged it a bit. The key seems to be this: 1: I'm adding a new entry, which is placed at the top of the bib file. |
Follow up issue to #9361
JabRef version
5.8 (latest release)
Operating system
Windows
Details on version and operating system
JabRef 5.8--2022-12-18--b7fae4b Windows 10 10.0 amd64 Java 18.0.2.1 JavaFX 19+11
Checked with the latest development build
Steps to reproduce the behaviour
Result:
Backup found dialogue triggers
Expected result:
Backup found dialogue should not trigger
The text was updated successfully, but these errors were encountered: