How to backup mopidy?


I had couple of times that my Raspberry’s SD cards got corrupted. For re-installation of Mopidy is not a problem, however I forever lost my playlists.

I wonder is there a way to backup Mopidy database or at least just the playlists?

I do not know how to backup the playlists but I use Win32DiskImager to make a full backup of my SD card.

This way if the card gets corrupted, I can simply put the backup again on the SD. This has the advantage that you do not need to reinstall mopidy or raspbian, but the backup file is much bigger of course.

I think I’ve found the playlist located at: ~/.local/share/mopidy/m3u

Thank you.

I do the same as 9and3r. I zero fill before I back up so it compresses nicely when I’m done.

cat /dev/zero > zero.file
rm zero.file

Then back up and optionally compress the image file. It’s easier to store and move 2 GB then 32 or more GB.


Running mopidy config shows the directories used by Mopidy so you can see where playlists are stored.

If you want to prevent SD card corruption, use a good power supply, a high quality SD card and always shutdown your pi properly. Faster SD cards (higher classes) are not necessarily higher quality. I’ve had great results with Samsung cards, and awful results with junk from Transcend. Industrial grade SD cards are the best. The best way to avoid SD card corruption is to not use an SD card by booting from a USB hard drive or over the network. Both of these methods are documented at

1 Like