Question/Request: Directory for data that should persist over updates.

Lefteris Karapetsas lefteris at slock.it
Fri Jan 29 11:37:27 UTC 2016


Understood. As soon as this becomes officially available let us know via
the mailing list. It's a much needed feature.

@Jamie Strandboge

Currently SNAP_DATA and SNAP_USER_DATA are versioned, so putting it as
> a fixed directory there is possible but likely messy.
>

What do you mean exactly? I currently have the blockchain saved under a
separate directory of $SNAP_APP_DATA_PATH and unfortunately this gets
versioned, and with each update gets copied.
I don't see any $SNAP_DATA or $SNAP_USER_DATA set when I launch a snappy
app. I use the shell of the hello-world snap to test.

Best,

Lefteris Karapetsas
Technical Lead at slock.it <http://www.slock.it>
Twitter <https://twitter.com/LefterisJP>, Github
<https://github.com/LefterisJP>, Blog <http://blog.refu.co>

On Thu, Jan 28, 2016 at 7:12 PM, Jamie Strandboge <jamie at canonical.com>
wrote:

> On Thu, 2016-01-28 at 14:33 +0000, John Lenton wrote:
> > On 28 January 2016 at 13:44, Lefteris Karapetsas <lefteris at slock.it>
> > wrote:
> > >
> > > Some snaps, including mine need to store some data, a database
> > > let's
> > > say, or in my case a whole blockchain. So far I was instructed to
> > > do
> > > that at $SNAP_APP_DATA_PATH. This works fine for now but whenever
> > > the user updates the snap from what I understand this whole
> > > directory will be copied into the next version's directory, to
> > > enable the transaction updating and rollback nature of Snappy
> > > Ubuntu.
> > >
> > > This is not going to work for my snap and I need to ask if there is
> > > any directory where I can store data for the application that will
> > > persist over any update. If not then this is something that really
> > > should be added at some point since I suppose many snaps will need
> > > to utilize behaviour like this.
> >
> > Right now there isn't a way to do this, but we do want to do
> > something
> > like this for 16.04. We still haven't decided whether it'll be a
> > separate directory (and associated environment variable), or whether
> > it'll be a fixed directory under $SNAP_DATA (and $SNAP_USER_DATA).
> >
> Currently SNAP_DATA and SNAP_USER_DATA are versioned, so putting it as
> a fixed directory there is possible but likely messy. Unless I'm
> missing some important details, it seems a separate directory and
> envvar is the cleanest.
>
> > We'll let you know via this mailing list when there's something ready
> > for testing.
> >
> > Thanks,
> >
> --
> Jamie Strandboge             | http://www.canonical.com
>
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20160129/c0c12de1/attachment.html>


More information about the snappy-devel mailing list