Open EngelPika32 opened 2 years ago
+1 on a global option to disable it. I do have a guest user who doesn't even have access to the Bookmarks App. This user only has access to a shared folder and 0MB storage on itself. With that backup feature enabled, my log file gets spammed with lots of error messages about Bookmarks not being able to create a backup folder for that user.
I'm currently not motivated to work on this. Pull requests welcome.
Back on track now.
@EngelPika32 Is file versioning installed by default?
v10.4.0 defaults to backups off.
Nice! IIRC only the files app is guaranteed to be there, all other apps (even if installed by default) may be disabled (or uninstalled) by the admin. [So… I don't know which apps are installed by default, but the defaults did change over the last major versions].
The admin settings could show a notice about the requirement of the versions app for continuous backups ("backup strategy"), and that otherwise, only the latest backup will be available. That way admins are reminded to configure file versioning while they configure the bookmarks app (or any other app requiring this). And as the bookmarks app just updates a file, it doesn't have to care about the versions app being available or not during backup creation.
Though, a notice/check about the versions app availability on the admin page would be helpful for sure :) Thinking about it, some setups might have totally different versioning solutions for their users. Hence it's probably best not to require one specific app/solution.
I made a quick mock of what the section in the admin settings could look like – with some options that might be useful: Text from image below for further usage (with some spelling/typo fixes):
Regularly export the users' bookmarks to a file in their space. This helps prevent the loss of bookmarks through falsy syncs or other unforeseen happenings.
The users can access and sync the export/backup like any other file. File format: HTML
Note: Users need at least some storage quota, otherwise the file can't be created (a few KB to MB).
Note2: We recommend enabling the versions app (or similar) for backup history and backup strategies. Otherwise only the latest backup is available.
Enable bookmarks backups to file for all users (global switch)
Enable backups by default [for new users] (option is ignored if the config is forced on all users)</label></p><p>Enter the default path and name for the backup file. (The user may customise this for themself in their settings.) – DevNote: maybe use a file-picker, if available?
Backup interval (in hours; I suppose)
Update the backup file even if no change was registered
Force config for all users
Hope this helps. Let me know if I can do anything else or for further questions^. And thanks for looking into this :)
versioning would be awesome
1318 nextcloud/bookmarks@0d7ce3d introduced a backup feature, which got enabled by default (sigh; not going over issues with that now. Should be obvious by now as it got mentioned in other issues as well).
1779 & #1781 asked for a feature to disable these backups. (which is now possible for a single user)
https://github.com/nextcloud/bookmarks/issues/1779#issuecomment-1100946407 wasn't implemented [yet, but the issue was closed already]
So, I'm opening this issue for a global admin option^. And…
https://github.com/nextcloud/bookmarks/issues/1318#issuecomment-1065080553 It's nice to have some sort of backup strategy, but why aren't you using existing versioning in nextcloud (which can be configured by the admin). Quick-Docs reference
Hence I propose updating the same file, instead of creating&deleting yourself. This would allow much better user-controlled backup behavior.
edit.: fixed issue linking;