-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Keep Database after restart #2787
Comments
Hello @MarcelCoding, I think you need an forcesave option, in Nextcloud it's named "Keep intermediate version when editing (forcesave)". This changes the behavior of the "save" button: if Nextcloud is down and you will press "save" then you will get message "An error occured while saving the file...". |
Cool, that would be a solution. But I think the database should not be dropped anyways. A user and an admin is not the same person and maybe to resolve the problem (why files cannot be saved) a restart is necessary. Therefore the data should be kept only when restarting onlyoffice. |
Maybe the default should be changed in nextcloud or at least the wording with the explicit explanation that this can happen if you don't enable the option. |
We have it in the connector documentation.
Changes are deleted from the database after they are sent to the document server cache, for example, this will happen if the editor receives the status of a closed document and this is regardless of the availability of the storage. And then this cache will wait until the storage is turned on and the first user who called the document will receive changes from the cache. |
That's interesting because the time I encountered data loss I've looked into all directories and there weren't an files. |
ONLYOFFICE/onlyoffice-nextcloud#931 (comment) is probably the reason files count not be moved from the database to the cache. But the data should not be automatically cleared from the database if the creation of the cache failed. |
When the container is restarted, it starts documentserver-prepare4shutdown.sh, that forcibly disconnects all users from documents and sends all changes from the database to the cache and then to the storage (nextcloud in your case). This is done to avoid data loss when stopping or restarting the container. The entire cache |
Agree, could you please describe the case of data loss in more detail so that I can repeat it? |
The cache could probably not be created, because x2t failed: ONLYOFFICE/onlyoffice-nextcloud#931 (ONLYOFFICE/onlyoffice-nextcloud#931 (comment)) (x2t is only failing for some document formats, not all) |
This issue is unique.
Your idea.
Not to drop the database is currently not possible:
I've also noticed that OnlyOffice displays in the bottom corner that all changes are saved.
The actual error when saving changes back to OnlyOffice only occurs when using the save button in the menu.
It would be nice, that the user would be informed instantly if there are errors writing to the underlying storage provider. (e.g. Nextcloud)
The text was updated successfully, but these errors were encountered: