sysutils/webdav-backup: add backup provider for WebDAV
I copied and edit nextcloud-backup to be able to use it with any WebDAV Server.
I needed to make some changes to the functionality compared to Nextcloud.php:
https://github.com/mietzen/opnsense-plugins/compare/6eb10e573ddbab6609a239de2d74c25c94c35585..52685adb1bf0f0f968f0a65fd1a22bb30fa49218
Apart from that I only changed the names from nextcloud to webdav.
I tested this with the WebDAV Service of mailbox.org's open-xchange OX-Drive.
Warning, this is the first time I wrote something in php I hope some finds the time for a proper review 👍
I needed to make some changes to the functionality compared to
Nextcloud.php: https://github.com/mietzen/opnsense-plugins/compare/6eb10e573ddbab6609a239de2d74c25c94c35585..52685adb1bf0f0f968f0a65fd1a22bb30fa49218 Apart from that I only changed the names fromnextcloudtowebdav.
Ok, so considering the above - here's an idea - make a toggle for switching between Nextcloud and generic WebDAV instead? Better than maintaining two plugins with pretty much identical code, isn't it?💡
Yes and no, I my opinion it would make more sense to only have a universal WebDAV option + Documentation for different providers, since you could also use nextcloud with this plugin. I would fear that we soon need switches for all kind of providers, e.g. Owncloud, Seafile, Box, etc.
But I also get that it is hard to "universify" a plugin that is published, forcing it current users to reconfigure.
I kind of agree with @doktornotor , having two almost identical plugins isn't great in terms of maintainability in the long run. I would expect that it shouldn't be that difficult to support other providers in the existing one without breaking people's setups. When working on the documentation it also has the advantage of improving both at the same time :)
In the long run we could always consider calling nextcloud to something more generic... starting with a shared codebase eases most future steps.
In the long run we could always consider calling nextcloud to something more generic... starting with a shared codebase eases most future steps.
Yep, I'd say rename os-nextcloud-backup to os-webdav-backup, the config bits migration for existing users should be pretty straightforward.
probably, but the first step is adding support for additional providers. We can rename in a future major release, no need to rush anything as naming is only cosmetic.