...
IMO there is one missing feature in the webdav saver : the ability to make backups.
It could be for instance the way save-tiddlers (PMario's plugin) works or the way TW Classic manages this question.
I have no idea how to do that and where ; a modification in the putsaver ?
a dedicated plugin ?.
If someone is interested and could take from here ...
For a client-server based version using WebDav we would need to specify some more requirements.eg: Should the backups be pushed to the server or should they be local ?
I've been using webdav for a few days (weeks ?) now. The main point for me is to be able to save easily my TWs as files. It works very well locally and for files on dropbox (I've tested with OneDrive : works fine too). I'm using Caddy on my PC (windows 10) and Serveur WebDAV on my android phone.
IMO the simplest form of backups, with this setting would be a button, like "download-full", which creates a local "backup".The mechanism is manual and a bit hacky, but it should be possible with 1 additional tiddler. ... We need to think about it ...That's definitely the fastest way. But imo it's a work-around.
I didn't know that. I'll have a look. Thanks
As a workaround I think it's a great idea and I could use this kind of backup (until a more definite solution ?)
\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end
{{$:/core/templates/tiddlywiki5.html}}
It works fine, thanks a lot !It creates index.html in the download folder, then index (1).html, index (2).html, as expected.
... In my opinion, the TiddlyWiki code shouldn't include backup capabilities.
Is it possible to download to a specific folder inside the Download folder ?
I could create a folder for TWs backups like "TWBackups" inside the Download folder and have my backups of TWs files come at this location. And eventually make a junction to another folder near the location of the TW.
Another idea would be to get the file name of the tw and add a time stamp before downloading (like in TW classic).
This has been an interesting thread to read. Like @FrD, I use webdav for most of my TiddlyWikis. What makes this conversation interesting is how you are trying to solve the problem. In my opinion, the TiddlyWiki code shouldn't include backup capabilities.
The backup should be handled on the server side (or desktop side in the case of local savers). Some WebDAV server implementations include versioning (i.e. http://sabre.io/dav/versioning/).
Most operating systems support a wide variety of backup solutions.
Even the PHP saver has built-in versioning/backup (it saves the last 10 versions by default in a backup folder).
Dropbox also has built-in versioning, so the service is doing backups for your. (https://www.dropbox.com/help/security/version-history-overview)
So does Google Drive (https://support.google.com/drive/answer/2409045?co=GENIE.Platform%3DDesktop&hl=en)
CouchDB (used by Note Self) also has built in versioning (sorry no clean link lots of how it works links like http://guide.couchdb.org/draft/documents.html)
On Thursday, May 31, 2018 at 3:49:03 PM UTC+2, Lost Admin wrote:This has been an interesting thread to read. Like @FrD, I use webdav for most of my TiddlyWikis. What makes this conversation interesting is how you are trying to solve the problem. In my opinion, the TiddlyWiki code shouldn't include backup capabilities.Why not. It's a plugin and a convenience function, if I don't want or can't use any other 3rd party app. .. In my experience they go away after some time, or the experience, in my area, is broken.The backup should be handled on the server side (or desktop side in the case of local savers). Some WebDAV server implementations include versioning (i.e. http://sabre.io/dav/versioning/).That's nice, when I use IIS, apache or nginx setup :/
...
-m
Going back to the put.js saver, what about doing a second "put" request just after the first one and giving it an URL pointing to a file (to be created) inside a folder (like "TWBackup") which could be on the same level as the original file. Same structure as in TW Classic.Would it be a way to go ?
On Friday, June 1, 2018 at 1:11:32 PM UTC+2, FrD wrote:....Going back to the put.js saver, what about doing a second "put" request just after the first one and giving it an URL pointing to a file (to be created) inside a folder (like "TWBackup") which could be on the same level as the original file. Same structure as in TW Classic.Would it be a way to go ?Not really. ... If the TWBackup directory doesn't exist on the server, the client / browser would need to create it first.While the "save action" seems to be simple, there is a littlebit going on in the background.
WebDav is an extension [1] to the HTTP(S) request methods [2]. At the moment we only use 3 HTTP functions:
But I was talking about a more simple use case : serving and saving local files (on the local filesystem or on dropbox or onedrive as you have local copies of the files). There should (?) be no access conflict on the files (of course it may happen, but you should master your own files ...).The backup folder could bee created before using the saver or the webdav server could maybe do it (after all it's on your filesystem).
So I'm pretty much in the case you refer as "local backups".
Maybe something like a "putlocal.js" file with backup ability could be created from the put.js. That was more my point.
On Friday, June 1, 2018 at 2:05:52 PM UTC+2, FrD wrote:...But I was talking about a more simple use case : serving and saving local files (on the local filesystem or on dropbox or onedrive as you have local copies of the files). There should (?) be no access conflict on the files (of course it may happen, but you should master your own files ...).The backup folder could bee created before using the saver or the webdav server could maybe do it (after all it's on your filesystem)."I can hear you" :) ... But as a software author, you can't rely on assumptions. Especially, that the setup is done right. Murphy's law will bite you ;) There's no way around it.
-mario