Like rsync
but for Mixxx databases and music.
NOTE: The project is still in very early stages, so please make sure to back up your mixxxdb and your music before trying it. Additionally the portable database's schema should be considered unstable until we have a proper solution for database migrations and schema versioning in place (e.g. using alembic), see #11.
+-------------------+
| Your local |
| mixxxdb.sqlite | <--+ +--------------------------+
+-------------------+ | | A portable musiclib with |
+--> mixync <--> | all your tracks, cues, |
+-------------------+ | | grids and other metadata |
| Your local | <--+ +--------------------------+
| music folders |
+-------------------+
A small CLI tool for copying a Mixxx database along with tracks to and from a portable and relocatable folder (*.musiclib
) for archival, storage on a flash drive, a web server, etc.
All invocations of mixync
follow the same pattern, roughly analogous to rsync
or cp
:
mixync [source] [dest]
where source
and dest
are so-called refs, which describe a store for metadata and music. Each ref can be one of the following:
- A local mixxxdb, e.g.
@local
,path/to/mixxxdb.sqlite
- A portable musiclib, e.g.
path/to/library.musiclib
- A debug output that prints updates just to stdout, either
@debug
or@debugcompact
For example:
# Copy your local mixxxdb and music to a portable musiclib
mixync @local ~/my-library.musiclib
# Copy a portable musiclib to your local mixxxdb and music folders
mixync ~/my-library.musiclib @local
More advanced examples include:
# Copy only tracks and playlists from your local mixxxdb to a portable musiclib
mixync -f tracks,playlists @local ~/my-library.musiclib
# Copy only tracks and crates from the directory named 'MyCollection' from your local mixxxdb to a portable musiclib
mixync -f tracks,crates -d MyCollection @local ~/my-library.musiclib
Note: While you can omit tracks e.g. by specifying
-f crates
to only copy crates, this usually isn't meaningful since the copied crates will always be empty (since no tracks were copied, thus no track ids were mapped). The same applied to playlists.
A portable musiclib
(a new format introduced by this tool) as generated by mixync
has the following directory structure:
my-library.musiclib
- library.sqlite3 <- Tracks (with portable paths), playlists, crates and cues
- folder1 <- Exported music folder
- track1.mp3
- track2.mp3
...
- folder2 <- Exported music folder
- track1.mp3
- track2.mp3
...