TiddlyServer backup and file ownership

240 views
Skip to first unread message

Glenn D

unread,
Oct 6, 2017, 7:00:37 PM10/6/17
to TiddlyWiki
I have this set up and running on my Raspberry Pi, but the backup feature doesn't seem to work. I set backups to '/home/pi/backup' and have a directory set up there, owned by pi:pi

I edited and saved a few tiddlers, but nothing shows up in the backup folder.

I also rebooted the Pi, just to make sure the TiddlyServer was restarted.

After some further checking around, I notice that most of the system tiddlers and several that I created myself are owned by pi:pi - but a lot of other tiddlers that I created are owned by root:root

Why would that be?

TonyM

unread,
Oct 6, 2017, 10:22:01 PM10/6/17
to TiddlyWiki
Glenn,

I don't have the full answer but the Tiddlers you update that are "served" to you are written back to the server by the server, not you. If you use the file save it is you saving the file.

I have created backup folders under all my Tiddlywikis that TiddlyServer Serves, updated the settings.json to "backup" and I am not seeing it backup.

Regards
Tony

RichardWilliamSmith

unread,
Oct 7, 2017, 12:05:21 AM10/7/17
to TiddlyWiki
Hi Glenn,

I'll look into this - I suspected there were some issues around ownership. Did you follow the instructions I wrote? ie; do you have 'crontab' or similar set up to restart the server on reboot? I'm wondering whether it reboots into a different account... have you tried giving the backup folder different permissions? Personally I'm ok with 'chmod 777'ing things when they're on the Pi (I keep my secret plans for world domination elsewhere). If that works, it might be simpler to install it as root in the first place, for less overall faffing.

I'd be grateful if you could let us know what you figure out.

Regards,
Richard

Arlen Beiler

unread,
Oct 7, 2017, 7:17:00 AM10/7/17
to TiddlyWiki
The backup folder should be relative to settings.json. But it sounds like you're using an absolute path, so that should work. One thing to try is to run node in your terminal and type fs.statSync('backup path string copied from settings.json') and see what it says. It could definitely be ownership, let us know :)

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5402cfb1-d595-4270-a3db-2d37efa4f016%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

@TiddlyTweeter

unread,
Oct 7, 2017, 8:01:10 AM10/7/17
to TiddlyWiki
Ciao Arlen

In posts about TiddlyServer can you please DIFFERENTIATE the Simple Saving Version (bundled) from the full node version?? Otherwise discussions will get people like me in a confused knot.

Or maybe they should be given totally different names?

Best wishes
Josiah

Arlen Beiler

unread,
Oct 7, 2017, 8:13:41 AM10/7/17
to TiddlyWiki
TiddlyServer is all the same. The only difference is whether it comes with a node_modules folder (the -bundled.zip version) or whether you have to run npm install yourself. And now the mac launcher version we are working on will contain the bundled version + launcher code. 

The backup folder only applies to single file TiddlyWikis, not TiddlyWiki folders, since NodeJS TiddlyWiki doesn't currently have a backup feature and TiddlyServer is using NodeJS TiddlyWiki for TiddlyWiki folders. But they both run on TiddlyServer.

Am I understanding your question?

Arlen

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

@TiddlyTweeter

unread,
Oct 7, 2017, 8:53:44 AM10/7/17
to tiddl...@googlegroups.com
Ciao Arlen

I probably don't understand my own question :-).

The point is this ... FUNCTIONALLY I'm a user who downloaded the "Bundled" (non-npm) version to be an alternative "TiddlyWiki-saver" to TiddlyFox. Nothing more. And I had no idea it did more than that. IF it has additional backup options then I'd need clearer documentation of that. I might use them, though I backup using normal backup software.

I think the difficulty I am pointing at is neither directly mine nor yours. Its in-between. Your coming from a great deal of knowledge and daily practice. I'm coming from a place of only wanting to be able to seamlessly save my TW.

Seamless saving by ONE product with ONE name that does ONE thing I think is what makes it SO important right now. IF its also got other useful features then that is good too BUT at a certain point when a newbie starts hitting code you have to enter through the console it starts looking less simple and gets confusing.

In other words: Have a dumb-version where you need know nothing else than how to install it (which is not so easy for dumb people already :-) that is targetted wholly at saving (only)?

Let's keep talking till both of us are clear what the other means, okay?

Best wishes
Josiah

Mark S.

unread,
Oct 7, 2017, 10:52:23 AM10/7/17
to TiddlyWiki
I'm curious where you down-loaded from. At github, if you scroll down you see the readme displayed, which details features like back-ups. Given, it's not intuitive at all that you need to scroll down to see it.

Mark

Arlen Beiler

unread,
Oct 7, 2017, 11:01:28 AM10/7/17
to TiddlyWiki
Hi TiddlyTweeter,
 
The point is this ... FUNCTIONALLY I'm a user who downloaded the "Bundled" (non-npm) version to be an alternative "TiddlyWiki-saver" to TiddlyFox. Nothing more. And I had no idea it did more than that. IF it has additional backup options then I'd need clearer documentation of that. I might use them, though I backup using normal backup software.

Everything I've ever said about TiddlyServer applies equally to the "Bundled" (non-npm) version and the "Source Code" (npm ) version after you run "npm install" on the npm version. 

"npm install" pulls in TiddlyWiki from NPM, whereas the bundled version already has tiddlywiki from npm included. 

If all you use it for is saving, that's fine. The NodeJS version of TiddlyWiki, and thus TiddlyServer, has some useful features, but they are not yet well documented. That was the whole point of making TiddlyServer, was to allow NodeJS TiddlyWiki data folders (there are a couple examples in editions) to be mounted, but it combined several other things that have been requested on this GG as well, such as the ability to serve static files alongside the TiddlyWiki server, and of course saving single-file TiddlyWikis. 

I am currently trying to make the configuration more user-friendly as well. And yes, I do need better documentation :) I'm thankful for those of you who have taken up the slack in figuring it out and helping others figure it out, including your help @TiddlyTweeter.

If you want more information on using the NodeJS version of TiddlyWiki, you can check out these links, but I digress. What TiddlyServer does is mount TiddlyWiki Folders (aka data folders) at a path so they can be edited, just like the server command. Under the hood, it actually uses the same code as the server command.

Let's keep talking till both of use are clear what the other means, okay?

Best wishes
Josiah

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

@TiddlyTweeter

unread,
Oct 7, 2017, 11:12:15 AM10/7/17
to TiddlyWiki
Ciao Mark S.

This is a good example of me, the idiot, having an aim I want get done with so I can get on writing (plays & stuff) and NOT have to deal with anything more than I need to know to be certain my writing won't go down a computer toilet.

Arlen has my apologies for my not paying attention. But I got working what I needed.

At the same time I don't think I'm unusual. There is only so much idiots need to know.

I'm convinced that TiddlyServer(Lite) is great for saving. A function thing other things can't. I don't need to know it backs up--especially if that involves much more than pushing a button. Backup I know about and do--there are zillions of programs that do that already.

Do you kinda get my drift?


Best wishes
Josiah

Arlen Beiler

unread,
Oct 7, 2017, 11:39:22 AM10/7/17
to TiddlyWiki
Do you kinda get my drift?

I think I am getting it. It's hard to know how to explain things for developer DIYers (like me) and end-user DIYers both at the same time. And then there are people with more important things to do :). But I see your point. 

When I published TiddlyServer, I did not foresee the discussion Firefox would generate, nor the role TiddlyServer would play in that discussion. My goal in making it was to make data folder wikis as flexible as single file wikis, thus the emphasis on data folders. 

I'll try to not overload people with technical details, except in technical discussions such as this one. 

Thanks,
Arlen

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

@TiddlyTweeter

unread,
Oct 7, 2017, 11:52:10 AM10/7/17
to TiddlyWiki
Ciao Arlen

Its an interesting discussion.

The thing I want to underline is difference between the AIMS of different kinds of users.

I do NOT find it a problem the whole thing it can potentially do IS under-documented. Why?  Because I'm not trying to do anything other than use it to save. And previously we worked through many details of how to do that here in GG. Its pretty clear now how to set it up (though maybe needs bringing together & written up tighter sometime?).

When I have my "get-on-with-it" hat on (I have to get something written by Thursday etc.) I'm NOT interested in anything other than being able to save TW seamlessly--which TiddlyServer(Lite) does. And special because it DOES THAT other things don't.

I already had auto-backup running for years so that addition adds nothing practical for me.

I think my broader question is actually about what is the MOST MINIMAL install needed to let you save TW? I.e. a VERSION as NARROW as possible for that purpose.

I think your interest is about how to widen it up. Its that very liberal, truly generous widening that I feel for idiots like me might be confusing. And its around that that I find the naming confusing--many things start to blur.

Best wishes
Josiah
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

@TiddlyTweeter

unread,
Oct 7, 2017, 12:10:11 PM10/7/17
to TiddlyWiki
Arlen Beiler wrote:

I'll try to not overload people with technical details, except in technical discussions such as this one.

Ciao Arlen

Just a footnote. It is NOT a problem for me witnessing technical discussions. This is a group that needs them often, is good at them and they are productive. Its in its nature.

My point is between a simple idiot's version of TiddlyServer("SaveOnly") and the more elegant, full featured TiddlyServer. 

Using the same name for both I do think can get confusing. EVEN IF the "SaveOnly" version is, under the hood, the same thing as the other version. Its a naming problem, I think. You think of ONE product. I think of TWO and I don't need to know anything about the Other One as it gives me complications I don't need.

I hope this is clearer?

Best wishes
Josiah

TonyM

unread,
Oct 7, 2017, 7:59:08 PM10/7/17
to TiddlyWiki
Josiah,

To add to your observations and in no way detract, sometimes we need to widen and make a solution more sophisticated, to make it simpler to use, It is a balancing act that anyone who knows the details will have difficulty understanding what it is to be a naive newbie. Perhaps we could recruit newbies to be part of a documented install process.

Perhaps from TiddlyWIki.com

Regards
'Tony

Glenn D

unread,
Oct 8, 2017, 5:06:26 PM10/8/17
to TiddlyWiki
Yes, i have crontab set up, although now that you mention it, I'm not sure if it runs under root or pi. I'll check that.

Glenn D

unread,
Oct 9, 2017, 8:24:46 AM10/9/17
to TiddlyWiki
I've never used the 'file save' so we can rule that out.

I chmodded both backup and the onboot.sh to 777 - rebooted. I can see that root is running npm, but not sure if that is the only process identifiable for tiddlyserver...

I edit a tiddler, changes are autosaved, and still nothing in the backup folder.

So everything works, but I am nervous about doing a lot more work without a backup. Really not sure how to proceed at this point.

Arlen Beiler

unread,
Oct 9, 2017, 9:07:53 AM10/9/17
to TiddlyWiki
Ok, two things to check.

1. Verify that the backup property in settings.json is a string with characters. If it is a string with zero length, backups will not happen. If it is a string with characters, an error will be thrown if the backup cannot be saved. You will see a line in the terminal that lists a 500 status code as well as an extra error message. 

2. Backups only apply to single file wikis, not data folders. If the wiki is indicating that it got saved (i.e. the check mark turns grey) then it should have saved. And if it did save, then the backup saved as well. 

So check for errors in the terminal. Then see if your changes got saved. Then make sure that the backup property actually specified a folder.

Hope that helps.
Arlen

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Arlen Beiler

unread,
Oct 9, 2017, 9:10:30 AM10/9/17
to TiddlyWiki
Backups and version history for data folders would need to be implemented under TiddlyWiki itself, in the filesystem adapter.
Reply all
Reply to author
Forward
0 new messages