I’m on Linux and using beets v1.6.0.
I have moved my entire music library from a failing drive, to a new drive. This results in a new path for the library. The beets database is still pointing to the old path, even though I’ve updated my config file. How can I change the path in the beets database? I tried using beet import -AC
as mentioned here but then I of course lose all my extended attribute fields that I want to keep. I also saw a suggestion here to edit the database directly, but that is beyond my skill-level unfortunately.
Suggestions would be greatly appreciated.
1 Like
Coincidentally I’m about to do the exact same thing so am replying only to keep updated with any advice you might get.
I have a related question: is it possible to store the contents of the .config folder (I’m on a Pi400) to the external drive where my music files are located? I do this with my Plex DVD library but in that case it’s just a matter of symlinking the folder from it’s original place on the boot partition to a folder on the external drive and it works well. The advantage there is that if I wanted to move the entire library to a new computer it’s just a case of moving the external drive and Plex (sort of) will take care of itself as the database and meta data comes with it.
Hello, by the way. Reasonably new Beets user (and absolutely loving it!) and new to the forum
I may have spoken too soon. The Beets database is located in a folder on my external music drive. All I needed to do was install Beets and the plugins on the new computer, move the drive then copy the files in ~/.config/beets/ to the same place on the new computer. Seems to be working OK so far (with a few test queries)
Does beet ls -p <query>
show the right path for you after the move?
Ah, well, I’m on Linux (Raspberry Pi) and so I just made sure the mount point for the drive was the same on the new machine e.g (/mnt/extusb/MusicLib) so as far as Beets goes on the new machine, it’s looking for my library at the same path so it works without having to modify any of the paths in the Beets database.
I’ve solved this issue by using DB Browser for SQLite, selecting the appropriate table and using the “Execute SQL” tab. The SQL commands used, I modified from the link in my original question.
The SQL used was first for “items”.
UPDATE items
SET "path" = CAST(REPLACE(CAST("path" AS TEXT),'/mnt/old/path', '/mnt/new/path') AS BLOB)
where channels = "2";
I decided to use where channels = "2";
because this was the value for all my tracks.
Then for the album art.
UPDATE albums
SET "artpath" = CAST(REPLACE(CAST("artpath" AS TEXT),'/mnt/old/path', '/mnt/new/path') AS BLOB)
where discogs_albumid = "0";
Same here for the where
argument.
2 Likes