Transferring Engine DJ Library to New MacBook Pro

That’s ok, it’s hard to explain, when the character set of the forum does funny things :wink:

seems the forum software it slightly changing the type of quotes when you copy paste the command, and because in UNIX slanted quotes have a different function than straight quotes, the command stops working.

Better manually type over the command, and be sure to use the quotes you find under the “4”-key on your keyboard…

My keyboard is Macintosh italian QWERTY, don’t think they match

Oh darnit :smiley:

The one above the 2!

@probot

This should work better (turns out I was using the wrong forum function for this):

sqlite3 Music/Engine\ Library/Database2/m.db 'SELECT path FROM Track;'

1 Like

Hello! Just copied your string. Nothing happens :person_shrugging:

EDIT I deleted the space after \ and I got this message:Error: unable to open database “Music/EngineLibrary/Database2/m.db”: unable to open database file

@probot, @Johan’s command looks right

Download SQLite Browser. It’s an open source tool to do queries in a DB with a UI.

1 Like

@Johan’s command runs correctly when I paste it in my Terminal command line.

@probot, at least your last error messages indicates the command line sqlite3 is working. The folder is “Engine Library” not “EngineLibrary” so you do need to escape the space with \.

Take @djliquidice’s suggestion and install DB Browser for SQLite. Once you open it choose File / Open Database and navigate to Music/Engine Library/Database2/m.db.

Once open select Browse Data, then Table: Track and look at the “path” column.

2 Likes

@probot indeed, @djliquidice’s suggestion is better for people not familiar with the command line. No hard feelings, I understand this is overwelming. Honestly my bad, I should have come up with that idea :sweat_smile:.

Use DB Browser for SQLite to access from your home directory Music/Engine Library/Database2/m.db. In the screenshot @androphonic posted you will see the same data listed under the “path” header. Copy some of those paths here.

The point is we are trying to figure out exactly where your database is referencing audio files. If you place your audio files in the exact same location Engine should find it. Or, if that is for some reason impossible or unwanted (can be a myriad of reasons), we will try to help you to do a “search and replace” on the paths in your database, so the paths are corrected and reference to the correct location.

Succes, and don’t give up! Doing it this way will give more predictable results than using a (paid) tool like Lexicon which essentially rewrites your entire database file.

Hello everyone,

Thank you all so much for your continued support—it’s truly appreciated!

I’ve just installed SQLite, and the first thing I discovered is quite interesting: my active Engine DJ database is located on my external 1TB SSD, where I have my Dropbox folder (but OUTSIDE the dropbox folder). And the actual music files are located in a folder named “Catalog” on my external 1TB SSD INSIDE Dropbox. This makes me think that the database in my Library/Music folder either isn’t being used or is somehow pointing to the one on the SSD. Thanks to this discovery—and your helpful suggestions—I can now view the exact contents of the Engine DJ database. My question now is this: is it possible to clone the data from this database (specifically the playlists and the grids/hot cues) onto my laptop? For context, the music files on my Laptop are stored in the mirrored Dropbox folder called “Catalog.” Specifically: “Catalog” (where my music files reside) location: One version lives on the external 1TB SSD I use with my desktop, and the other is on the internal Macintosh HD within the Dropbox folder on my laptop.

Is such a transfer even possible?

One important detail. Typically, the m.db data file for the tracks added to Engine DJ from an attached drive will be on the attached drive in [attached drive]/Engine Library/Database2/m.db. The laptop /Engine Library/Database2/m.db will not hold those data for the attached drive. When you open Engine DJ, it will aggregate the track data from the laptop and all attached drives and display those as your “library”. Now, since you copied the m.db from your Mac Studio to the laptop, they will be there. I don’t know if you change the path on the laptop to the full path what will happen. I think it’s best to put that m.db on the remote drive and correct the path as a relative there.

E.g., I added a track from an attached drive. It did not add it to m.db on my desktop. It added it to m.db on the attached drive. This is the path for that track in m.db

../music2/01 Narkopop I.m4a

This is what Engine DJ library program displays in the directory column.

/Volumes/USBDisk/music2/01 Narkopop I.m4a

Ah, I was writing about that as you discovered it.

Indeed, Engine puts a database on each and every drive you connect. The audio files on drive A get put in the database of drive A, the audio files on drive B are put in database on drive B… Audio files on drive B can’t be on the database on drive A…

If you copy both audio files and database to the same relative location to each other on another drive, this should be possible, given Engine mostly uses relative paths (paths using “../” to go one folder up, instead of beginning with the absolute “/” which means the root of your drive)

So, if your database resides on EXTERNALDRIVE/Engine Library/Database2/m.db

and your music resides on EXTERNALEDRIVE/Catalog/music.mp3

you can copy your database to /Users/username/Music/Engine Library/Database2/m.db

AND copy your music files to /Users/username/Music/Catalog/music.mp3

This should work.

Suppose your catalog folder is in /Catalog/music.mp3, or even /Users/username/Catalog/music.mp3 (notice the Music folder is ommitted here), Engine wont find your files…

So, either put your music in “/Users/username/Music/Catalog/music.mp3” (and your database in “/Users/username/Music/Engine Library/Database2/m.db”), or do indeed a search and replace in sqlite3 which would change all paths pointing at another folder…

15eur…sub to lexicon for one month and cancel…relocate your library with ease.

1 Like

Only if you reference music on those external volumes.

1 Like

Almost there! I’ve copied my Engine DJ database from the 1TB SSD to the Library/Music folder on my laptop. When I open Engine DJ, all my playlists, hotcues, grids and collections show up—but they’re greyed out (in red). I tested relocating one track manually, pointing Engine to the new location on my internal drive under the “Catalog” folder, and it worked! The issue is, I’ve got around 2500 tracks to relocate, and doing it one-by-one isn’t an option. So here comes SQLite. think I need to run some kind of query or script to rewrite the file paths directly in the database… but I’ve no idea where to start.

Have you given the auto relocate a try? I’m not expecting it to work, but perhaps try 20 or so tracks to see if it finds them.

UPDATE: I was able to make it work! I used SQLite with the help of ChatGPT. That’s amazing guys, thank you so so much! Here a step by step guide for future eventual players who will be in my same situation:

:shield: Step 1: Back up your database

  1. Open Finder.
  2. Go to your external SSD > Engine Library > Database2 folder.
  3. Find the file called m.db.
  4. Right-click > Duplicate it. Rename the copy to m_BACKUP.db.

:white_check_mark: Now you’re safe. If anything goes wrong, you can restore the backup.


:open_file_folder: Step 2: Open the database

  1. Open DB Browser for SQLite.
  2. Go to File > Open Database…
  3. Select the m.db file from the Engine Library/Database2 folder.

:magnifying_glass_tilted_left: Step 3: Find your music file paths

  1. Click the “Browse Data” tab (top menu).
  2. In the table dropdown, choose the one that looks like Track.
  3. Look for a column named path or something similar — this shows where each music file is located.
  4. Scroll sideways if needed.

Can you now see a list of full file paths, like:

swift

CopyEdit

/Volumes/MySSD/Dropbox/Catalog/Track1.mp3

or

swift

CopyEdit

/Users/yourname/Dropbox/Catalog/Track1.mp3

:pushpin: If yes, send me:

  • One sample old path (from the SSD)
  • One sample new path (on the laptop)

old path: ../Dropbox/- MUSIC -/DJ VAULT/- Catalog -/xxx.mp3

new path: ../../Library/CloudStorage/Dropbox/- MUSIC -/DJ VAULT/- Catalog -/xxx.mp3

Brilliant — thanks for sharing the paths! Since they both use relative paths (starting with ../), we can easily create a safe update for them in DB Browser.


:receipt: Your Simple SQL Query

Here’s the exact query to paste into DB Browser’s “Execute SQL” tab:

sql

CopyEdit

UPDATE Track
SET path = REPLACE(path, '../Dropbox/- MUSIC -/DJ VAULT/- Catalog -/', '../../Library/CloudStorage/Dropbox/- MUSIC -/DJ VAULT/- Catalog -/')
WHERE path LIKE '../Dropbox/- MUSIC -/DJ VAULT/- Catalog -/%';

:white_check_mark: What it does:

  • It finds all tracks starting with the old path
  • It replaces just that beginning part with the new Dropbox CloudStorage path
  • Playlists, hot cues, and grids are untouched — only the file locations are changed.

:gear: Here’s What to Do in DB Browser (Step-by-Step)

1. Open the SQL Tab

  • At the top of DB Browser, click the tab called “Execute SQL”.

2. Paste the Query

Copy and paste this into the big white box:

sql

CopyEdit

UPDATE Track
SET path = REPLACE(path, '../Dropbox/- MUSIC -/DJ VAULT/- Catalog -/', '../../Library/CloudStorage/Dropbox/- MUSIC -/DJ VAULT/- Catalog -/')
WHERE path LIKE '../Dropbox/- MUSIC -/DJ VAULT/- Catalog -/%';

3. Find the Execute Button

Look for a small blue triangle (:play_button:), not a lightning bolt (sorry for the confusion earlier — it’s a triangle icon now!).

It’s usually:

  • In the toolbar, just above the query box
  • Tooltip says “Execute the current SQL” or “Execute all”

Click that :play_button: triangle.

4. Save the Changes

  • Now click the “Write Changes” button (top-right of the window).
  • Then you can close the database.

:white_check_mark: Done!

4 Likes

Well done for sorting it, and great post too. Hopefully something that can be moved into the tutorials section.

1 Like

If Engine DJ worked like any other music database software, we wouldn’t have to jump through all those hoops.

Thats great news! Have fun sorting music on your new laptop :wink:

Well yes, and no. This thread again shows that relocating tracks is a very realworld scenario, and there is no really foolproof way for the novice user to get Engine DJ doing what it needs to do…

However, as an advanced user I would prefer this method over any automatic method, because this way I know for sure what I am doing, and any automatic relocate feature can potentially make a mess of things. Some 20 years ago the Traktor autorelocate feature messed up my collection, and I still find remnants of this booboo in my collection…

Actually Im pretty grateful about the open sqlite database, because this allows me to write commend line tools for extra database maintenance. Impossible with Rekordbox!