Where to store file that are persistent?



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,

Multiple containers on same hardware?

Hey, sorry for the delay!

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

Best, Lorenzo


Hey Ijs,

Will they also be persisted on a reboot or shutdown?

Kind regards,


Hi Frederik,

Yes they will.

Best, Lorenzo



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

Kind regards,


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