Where to store file that are persistent?


#1

Hi,

I want to store files on the local file system of the Raspberry that are persistent during updates and reboots.

How should I approach this? What path should I use?

Kind regards,
Frederik


Multiple containers on same hardware?
#2

Hey, sorry for the delay!

If you put your data in /data it won’t be touched on application update.

Best, Lorenzo


#3

Hey Ijs,

Will they also be persisted on a reboot or shutdown?

Kind regards,
Frederik


#4

Hi Frederik,

Yes they will.

Best, Lorenzo


#5

Hi!

And how do I store my data from a database in this directory?
(for instance mysql)

Kind regards,
André


#6

Hey Vergis,

You need simply to specify /data as a location to store database files. This link suggests --datadir=path as an option for this, and this link gives details on setting up in ubuntu which should be portable to debian/raspbian.

Best, Lorenzo