Where to store file that are persistent?

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

Hey, sorry for the delay!

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

Best, Lorenzo

1 Like

Hey Ijs,

Will they also be persisted on a reboot or shutdown?

Kind regards,
Frederik

Hi Frederik,

Yes they will.

Best, Lorenzo

Hi!

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

Kind regards,
André

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