Can I restore the EngineDJ database from the Prime 4 to my laptop

Hello everybody. I need your help. My SSD of my laptop was broken. So the Engine DJ database and backup who are on the c-drive were both corrupt. I do have a backup but it is very old. I have all my music stored in the directory D:\Denon\Library

On my Prime 4 I have an internal SSD with all the music files and EngineDJ database. However the file-structure is completely different. So when I copy the database file to the c-drive all my files are red because Engine looks for them on the C-drive (where the files are not available). I have opened the database with DB Browser For SQLite and I am able to change the path in the table so it is correct, but for 13000+ lines that is too much work.

Then I discovered the Lexicon software. Does anyone have a good example or manual how to use Lexicon to relocate my files? I really think it is possible with this piece of software.

Sorry to hear of your misfortune.

You can’t go from a performance DB to a primary without some work. That work is writing a program that will locate the songs and update the Track table of m.db and a few other things.

Sad to hear of yet another person who doesn’t back up their stuff. :frowning:

Very usefull comment :face_with_spiral_eyes:

Hi, I don’t know if you are a bit handy with SQL, if so I can give you some scripts.

All the help is welcome :face_savoring_food:

Today I don’t have time, but tomorrow I will help you.

That’s awesome :heart_eyes:

Regarding Lexicon, I just started using it this week. If it’s just the path of your tracks that has changed, yes, you can use the Utility> Find Lost Tracks and enter the old path and the new path.

Specifically, import your Engine Library by selecting the Sync tab on the left, and import tracks and playlists on the bottom left of the sync page. Then use the Find Lost Tracks utility. Then use sync to send it back to Engine DJ.

You have to subscribe (monthly or yearly) for the sync features. There is a 20% discount coupon floating around. That brought the cost of a year’s subscription to USD136 for me. It is well worth it for me.

Tutorials:

At the same time, @Dj-PowerG’s script offer is free and should do the job.

Edit: There is a 30-day free trial. I think you can import and find lost tracks. You just can’t sync back with the trial. That would let you find out if it works.

1 Like

I never tried it myself, but I don’t see why tracks would go missing if you copy the entire “Engine Library/” folder to “/Users//Music/Engine Library/”? The paths in m.db are all relative to the “Engine Library/” folder, and your music on your USB drive is in the “Music/” subfolder. Copying this as a whole shouldnt break anything… (speaking Mac paths here, but you get my point)

Ofcourse your music will not be in the D drive anymore. If that is really mandatory you can do a search and replace using sqlite:

sqlite m.db
UPDATE Track SET path = REPLACE(path, 'Music/', 'D:/Denon/Library/');
.quit

There is a small chance that it will falsely change a path from an album with the name “Good Music”. Thats because the above statement doesn’t require “Music/” to be in the beginning of the string. If so, I suggest you place your music in D:/Denon/Music, and start over with the original m.db:

sqlite m.db
UPDATE Track SET path = CONCAT('D:/Denon/' + path);
.quit

Succes! This is a good time to learn sqlite! But as always:

!!!BACKUP THE M.DB OF YOUR USB DRIVE BEFORE ATTEMPTING ANY OF THIS!!!

1 Like

Biggest issue is that people wanting to use a performance volume’s songs is they want them in the original location and not how Engine structure the file locations.

1 Like

Well, I stand with what I said in other posts: a relocate function is never 100% reliable, not even Lexicon’s. If you want to be 100% sure the link between your Engine Library and the physical file remains intact, you’ll have to leave to file in its new home… Or do a lot of manual labour.

PS: OP could also copy your USB stick’s library to your D drive. You can sync/export between 2 drives, so this should work.

PS2: On top of that, shouldn’t Engine’s relocate function have to work 99.9% because OP didn’t change filenames nor track lengths?

EDIT: oh no, I get it, Engine’s export function renamed some files, didn’t it? In that case, Engine’s relocate is worthless… But then I suspect Lexicon would struggle too…

I agree. @DJSeppie, did you try copy the Prime 4 /Engine Library/ folder to the root of D:? That is undoubtedly how it is on the Prime 4, so then the paths won’t be broken.

Also, don’t forget there is a separate /Engine Library/Database2/m.db on each drive you include music in the library. If you want your music on D:, your database for those files should be in D:/Engine Library/Database2/m.db. I’m not even sure if Lexicon deals with music on attached drives when syncing. Engine DJ conglomerates m.db from all attached drives to show your “library.”

Does it actually rename the track file? I didn’t think so, although it might make sense to correct for illegal characters in exFAT, FAT32 file names.

Something is better than nothing.

1 Like

I’m now wondering what exactly OP wants to retrieve. If it’s only his music, it’s just a matter of copying the music files from his P4 back to his laptop and importing them into Engine Desktop.

Yeah, but this way you’ll lose playlists, grids, cues and loops…

For me personally that would be disastrous…

I have a complete copy of my music in a folder structure on the d-drive. So the music is not missing there, but only the references to the correct files.

I have 70+ playlists (these are basically just categories) where I put in a lot of work so for me it is also disastrous at the moment

1 Like

I do have all my files in the folder d:\Denon\Library\Default From there I have folders A-Z which are sorted by the Artist title. On the Prime the folders and files are located in subfolders with the name of the album etc. So this totally different, but I guess the name of the file is the same. Really don’t understand why Engine does this, why not keep the same folder structure?

Im no expert here, but what happens if you load the old backup (keep the full library safe elsewhere whilst you do this), or at least load the backup engine dj folder into your music folder, then do a ‘sync to engine desktop’, does it not update all the playlist and other info back to the desktop app?

In the past I have have seen that Engine does some sort of merge, so I don’t dare to do this. Last friday I had contact with an engineer from InMusic and he told me there was no other supported option than to start over with the database… That was a bit disappointing, but an expected reaction because they cannot support all these manual database edit solutions.

1 Like

This is huge. then a power shell script could fix this right up.

You would just lose your history data and i imagine that’s not that important to you.