mopidy / mopidy-local

Mopidy extension for playing music from your local music archive
https://mopidy.com/ext/local/
Apache License 2.0
61 stars 26 forks source link

where is the SQLite database saved #46

Closed sasgoose closed 4 years ago

sasgoose commented 4 years ago

Hi,

I am using docker and local database seems to be blown away each time I restart. Where is the database located so that I can map this to my host machine and not lose it.

Cheers

sasgoose commented 4 years ago

Found it! It was in /var/lib/mopidy/.local/share/mopidy/local/

jodal commented 4 years ago

I'll add some more detail for the next one finding this...

Mopidy-Local stores its database in a subdirectory named local (as in Mopidy-Local) in the directory pointed to by the the Mopidy configuration core/data_dir. Quoting the core/data_dir docs:

When running Mopidy as a regular user, this should usually be $XDG_DATA_DIR/mopidy, i.e. ~/.local/share/mopidy.

When running Mopidy as a system service, this should usually be /var/lib/mopidy.

In other words, the database will usually be at:

The case we see here is a combination:

alirezadigi commented 10 months ago

@jodal hi, thanks How can I change these directories ( "/var/lib/mopidy/.local/share/mopidy/local/")??

kingosticks commented 10 months ago

By changing the config setting https://docs.mopidy.com/en/develop/config/#confval-core-data_dir