NOTE: rbMigrate is in no way affiliated with Alpha Theta / PioneerDJ or their Rekordbox software.
rbMigrate is a tool to update file paths in your Rekordbox database after moving your music collection. It automatically updates the FolderPath field in the DjmdContent table and optionally updates XML playlist files. Useful for exporting your Rekordbox library to an external drive or new computer. Confirmed working with rekordbox v7.x. but should also work with v.5.8. and v.6.x.
Recommended: Download the prebuilt GUI app from the Releases page — no Python installation required.
- ⭐️ Automatic Path Replacement: Updates all file paths in the database
- ⭐️ Safety Features:
- Automatic backup creation before changes
- Preview mode to see changes before applying them
- File existence validation
- ⭐️ Simple GUI: Point-and-click wizard (macOS
.app/ Windows.exe) — recommended for most users - ⭐️ CLI Tool: Command-line interface for advanced users
- ⭐️ Flexible Configuration:
- Auto-detection of database location
- Detailed reporting with live log pane
- ⭐️ XML Support: Optionally updates XML playlist metadata
This project relies on the following open-source libraries:
- pyrekordbox - Rekordbox database library for Python
- sqlcipher3 - SQLite3 wrapper with SSL support
- lxml - XML and HTML parsing library
- mutagen - Audio metadata handling
- sqlalchemy - SQL toolkit and ORM
- psutil - Cross-platform process and system utilities
- Python 3.8 or higher
- pyrekordbox >= 0.4.0
- sqlcipher3 (required for database access)
Get the prebuilt app — no Python installation required.
Download the latest release from the Releases page:
| Platform | Download | Quick Start |
|---|---|---|
| macOS | rbMigrate-arm-v*-*.dmg (Apple Silicon M1–M4) or rbMigrate-intel-v*-*.dmg (Intel Macs) |
1. Double-click to open 2. Drag to Applications 3. Launch from Applications |
| Windows | rbMigrate.exe |
1. Run the installer 2. Launch from Start menu |
macOS users: the first launch shows an "Apple could not verify…" security prompt. This is expected for unsigned apps — see Opening rbMigrate on macOS for a 30-second fix.
What's included:
- All dependencies (pyrekordbox, sqlcipher3, tkinter, etc.)
- Ready to run — no Python setup needed
- Verified on the target platform
rbMigrate is not signed with an Apple Developer certificate, so macOS Gatekeeper blocks the first launch with:
"Apple could not verify "rbMigrate-intel" is free of malware that may harm your Mac or compromise your privacy."
This warning appears for any app distributed outside the App Store without a paid Apple developer notarization — it does not mean the app is malware. rbMigrate is open source, so you can audit everything it does in this repository. To open it anyway:
- When the warning appears, click Done (do not click Move to Trash).
- Open System Settings → Privacy & Security.
- Scroll down to the Security section and find this message:
"rbMigrate-intel" was blocked from use because it is not from an identified developer. - Click Allow Anyway, then authenticate with your password or Touch ID.
- Launch the app again. A second dialog appears asking if you're sure — click Open.
The app opens normally, and macOS won't ask again for this version.
The block is caused by the quarantine attribute macOS adds to downloaded files. Remove it once and launch normally afterwards:
xattr -dr com.apple.quarantine /Applications/rbMigrate-intel.appAdjust the path if you run the app from somewhere else (e.g. ~/Downloads).
Not sure which download you need? Click the Apple menu () → About This Mac. If the Chip/Processor line says Apple M1/M2/M3/M4, use
rbMigrate-arm; if it says Intel, userbMigrate-intel.
See Downloads from Releases above for platform-specific instructions.
If you prefer to build the app yourself, or need to customize it:
- macOS: Python 3.8+ with tkinter (the build script creates its own venv)
- Windows: Python 3.8+ (the build script creates its own venv)
-
Clone the repository
git clone https://github.com/your-org/rbMigrate.git cd rbMigrate -
Build the app (macOS)
./build_macos.sh
Produces
dist/rbMigrate.appanddist/rbMigrate-<timestamp>.dmg. -
Build the app (Windows)
build_windows.bat
Produces
dist\rbMigrate.exe. -
Run from source (optional)
python rbMigrate_gui.py
See Building a Distributable App for details.
The GUI is the recommended interface — a simple, point-and-click wizard with all the features you need.
Database selection
Browse…— open a file picker to select your Rekordboxmaster.dbAuto-detect— automatically finds your database location (works on most systems)- The file picker now correctly shows files ending in
.db(not.master.db)
Path management
- Browse for old and new music folders
- Real-time validation — the app checks that paths exist before proceeding
- Path suggestions based on your OS (e.g.,
~/Library/Application Support/Pioneer DJ/Rekordbox/Master/on macOS)
Safety controls
- Preview mode — see exactly what will change before applying anything
- Backup creation — automatic timestamped backup before each update
- Update DB — apply the changes to your database
XML playlist metadata
- Update XML — optionally update XML playlist files (
masterPlaylists6.xml,automixPlaylist6.xml) - When enabled, the app checks for XML files in the same directory as your database
- If XML files don't exist, the toggle has no effect and 0 files are reported as updated
- XML files are only updated with the product version to ensure consistency with the database
Live feedback
- Real-time log pane showing exactly what the engine is doing
- Progress indicators for each step
- Clear success/error messages
Quick workflow:
- Click Preview changes (default)
- Review the summary in the log pane
- If everything looks correct, click Update DB
- Confirm the update when prompted
- Close Rekordbox before updating to avoid database locks
Safety tips:
- Always run Preview first to see what will change
- The app creates a backup automatically (unless you disable it)
- Missing files at the new location are reported — the app won't update them
- You can cancel at any time during the update process
If you prefer to run the GUI directly from source:
python rbMigrate_gui.pyThis is useful if you want to customize the code or develop new features.
Note: The GUI is deliberately simple. For advanced use cases (custom database paths on the command line, verbose output, force mode), use the CLI tool instead.
Prebuilt installers can be built with PyInstaller. PyInstaller does not cross-compile, so:
- The macOS build must run on a Mac.
- The Windows build must run on Windows (or Windows CI).
- Python 3.8+ (the build creates its own venv)
- The runtime dependencies install automatically via
requirements.txt pyinstaller(listed inrequirements-dev.txt)
./build_macos.shProduces dist/rbMigrate.app and dist/rbMigrate-<timestamp>.dmg.
Run on a Windows machine:
build_windows.batProduces dist\rbMigrate.exe.
If you don't have a Windows machine, push this repo to GitHub and the included
workflow (.github/workflows/build.yml) builds both the macOS app and the
Windows .exe on every push (and on demand via Actions → Build → Run
workflow). Download them from the workflow's Artifacts section. GitHub's
Windows runners typically come with a SQLCipher-compatible toolchain, and the
build script installs the remaining dependencies.
Run the script without arguments to interactively set up the paths:
python rbMigrate.pyThe script will prompt you for:
- Old file path (e.g.,
~/path/to/old/musiclibrary/) - New file path (e.g.,
/path/to/new/musiclibrary)
Specify all paths directly on the command line:
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"Preview what will change without modifying anything:
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary" \
--dry-runEnable automatic backup and XML metadata updates:
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary" \
--backup \
--update-xmlSpecify a custom database location:
python rbMigrate.py \
--db-path "/path/to/PIONEER/Master/master.db" \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"Show detailed progress information:
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary" \
--verboseSkip automatic backup creation (not recommended):
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary" \
--no-backup| Option | Description | Required |
|---|---|---|
--db-path |
Path to Rekordbox database (master.db) | No (auto-detected) |
--old-path |
Old file path to replace | Yes |
--new-path |
New file path | Yes |
--dry-run |
Preview changes without modifying | No |
--no-backup |
Disable automatic backup | No |
--update-xml |
Update XML playlist metadata | No |
--verbose |
Show detailed output | No |
The script uses the pyrekordbox library to access the Rekordbox database:
- Connects to database: Uses
Rekordbox6Databaseclass - Queries tracks: Finds all tracks where
FolderPathstarts with the old path - Validates files: Checks if files exist at the new location
- Updates paths: Modifies the
FolderPathfield for each track - Commits changes: Saves changes to the database
The script optionally updates XML playlist files (masterPlaylists6.xml, automixPlaylist6.xml):
- Updates the product version to ensure consistency
- Maintains compatibility with Rekordbox
- Does not modify file paths (XML files don't store them)
When XML files are missing:
If the "Update XML" toggle is enabled but no XML files exist in the database directory:
- The app silently skips the update
- 0 files are reported as updated in the log
- No error or warning is raised
- This is expected behavior when you have a fresh database with no playlist files
How it works:
The XML files are located in the same directory as your master.db file:
- macOS:
~/Library/Pioneer/rekordbox/masterPlaylists6.xml - macOS:
~/Library/Pioneer/rekordbox/automixPlaylist6.xml - Windows:
C:\Users\<username>\AppData\Roaming\Pioneer DJ\Rekordbox\masterPlaylists6.xml
The app only updates XML files that actually exist on your system.
Automatic backup creation:
- Timestamped filename:
master.db.backup_YYYYMMDD_HHMMSS - Stored in the same directory as the database
- Safe to keep multiple backups
Gatekeeper blocks unsigned apps on first launch — this is expected, not malware. Follow the steps in Opening rbMigrate on macOS.
Solution: Install the required package:
pip install pyrekordbox sqlcipher3Solution: Install sqlcipher3:
pip install sqlcipher3Solution: Use a virtual environment (recommended):
python3.11 -m venv venv
source venv/bin/activate # On macOS/Linux
pip install pyrekordbox sqlcipher3
python rbMigrate.py ...Solution: Specify the database path manually:
python rbMigrate.py \
--db-path "/path/to/PIONEER/Master/master.db" \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"Solution: Verify the path is correct. If the path is correct, you can continue:
python rbMigrate.py \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"The script will ask for confirmation before proceeding.
Solution: Ensure your music files are actually at the new location. The script will skip files that don't exist:
- Tracks with missing files will be skipped (not updated)
- You'll see a warning in the output
- Run again after verifying file locations
Solution: Check file permissions and disk space:
ls -la /path/to/PIONEER/Master/Ensure you have write permissions to the database directory.
Solution: This usually happens with very large libraries:
- Try running in verbose mode to see progress:
python rbMigrate.py --verbose ...
- Close Rekordbox before running the script
- Ensure the database is not being accessed by other processes
The script auto-detects the Rekordbox database location. Common locations:
~/Library/Application Support/Pioneer DJ/Rekordbox/Master/master.db
C:\\Users\\<username>\\AppData\\Roaming\\Pioneer DJ\\Rekordbox\\Master\\master.db
~/.local/share/Pioneer DJ/Rekordbox/Master/master.db
If your database is in a custom location (as in your case):
python rbMigrate.py \
--db-path "/path/to/PIONEER/Master/master.db" \
--old-path "~/path/to/old/musiclibrary" \
--new-path "/path/to/new/musiclibrary"- Always create a backup before making changes
- Use Preview mode first to see what will change
- Verify file locations before running
- Close Rekordbox while the script is running
- Keep multiple backups in case you need to restore
If you need to restore from a backup:
- Stop Rekordbox
- Find the backup file (e.g.,
master.db.backup_20240821_143022) - Rename the current database:
mv master.db master.db.current
- Restore from backup:
cp master.db.backup_20240821_143022 master.db
- Start Rekordbox
No. The script only updates file paths in the database. It does not modify audio files or delete anything.
Yes. The script is idempotent - running it multiple times with the same paths is safe.
Use a backup to restore. See the "Restoring from Backup" section above.
Only Rekordbox. The database format is proprietary and specific to Pioneer DJ.
For a typical library (1000-5000 tracks), it takes 1-5 minutes. Very large libraries may take longer.
The script updates tracks in playlists automatically. Playlist references are updated as part of the database update.
If you encounter issues:
- Check the troubleshooting section above
- Run with
--verboseflag for detailed output - Ensure pyrekordbox is properly installed
- Close Rekordbox before running the script
This script is provided as-is for personal use. Use at your own risk.
- Separate Apple Silicon and Intel builds (
rbMigrate-arm/rbMigrate-intel) - Versioned DMG filenames (e.g.
rbMigrate-arm-v0.2.0-<timestamp>.dmg) - App version shown in the GUI title bar, startup banner, and
--versionflag - macOS app bundle now carries its version in the Info.plist
- Dropped the universal2 build: numpy and psutil don't publish universal2 wheels, so a fat binary can't be produced from pip-installed dependencies
- Fixed Intel build failing in CI (x86_64 venv is now created in place instead of moved)
- Fixed ARM bundle being deleted before the Intel build finished
- Documented how to open the unsigned app past macOS Gatekeeper
- Initial release
- Database path update functionality
- Backup creation
- Preview mode for safe updates
- XML metadata update
- Detailed reporting
- Comprehensive error handling
