Policy for dealing with webapps' datafiles?

Andrew P. infofarmer at gmail.com
Mon Nov 14 06:30:59 PST 2005


On 11/14/05, Gerhard Schmidt <estartu at augusta.de> wrote:
> On Mon, Nov 14, 2005 at 04:03:46PM +0300, Andrew P. wrote:
> > Many applications, particularly web applications,
> > store data in xml, text or binary files. They come
> > with an initial set of files, so that we can start
> > using them right away - without the need to create
> > anything (which might even be unsupported).
> >
> > So, you install a forum, a calendar or something
> > else, use it, like it - but when you run portupgrade
> > all your data is gone.
> >
> > It seems that the most harmless way to deal with
> > it is to leave potentially valuable files untouched
> > during deinstall, and echo a message about it. It's
> > ugly and reminds me of debian apt, but we've got
> > to deal with it one way or another.
> >
> > Does anyone have a bright idea about this? I
> > searched some mailing lists, but never saw one
> > big discussion on this.
>
> Some Ports install this files as .sample files and copy them to their name
> if they don't exist. On deinstall only the .sample file is deinstalled
> and on reinstall the new file will be installed as .sample and your old
> file will stay in place, and no data is lost.
>
> I think this is a very elegant way to handle such problems.

That's cute when it is about 3-5 config files at max.
But what about 15, 50, 100 files scattered around
different directories? The whole concept of sample
files is lost then.

Then again, it's good for config files. A new sample
is installed - and user can review new options and
knobs. But what about data files? The user will never
want to look at some cryptic XML scheme, so there's
no point in sampling it.


More information about the freebsd-ports mailing list