Migrate media metadata from one Plex library to another
1.5K
Migrate locked metadata fields or playlists from one Plex library to another. This tool finds matching media items between a source and destination library (by filename) and copies locked metadata fields or recreates playlists on the destination.
Copies locked metadata fields from source to destination items, including:
--playlist)Copies a playlist from one server to another by matching playlist items to the destination library by filename. Smart playlists are not supported.
Docker images are available from Docker Hub at cdzombak/plex-meta-migrator.
The Docker image stores credentials in /data/.creds.json. Mount a volume to /data to persist credentials across runs:
# Create a local directory for credentials
mkdir -p ~/.plex-meta-migrator
# Run interactively with persistent credentials
docker run -it --rm \
-v ~/.plex-meta-migrator:/data \
cdzombak/plex-meta-migrator
On first run, you'll be prompted for Plex.tv credentials. After authentication, the token is saved to the mounted volume and reused automatically on subsequent runs.
docker run -it --rm \
cdzombak/plex-meta-migrator \
--source-url http://192.168.1.100:32400 \
--source-token YOUR_SOURCE_TOKEN \
--dest-url http://192.168.1.101:32400 \
--dest-token YOUR_DEST_TOKEN
docker build -t plex-meta-migrator .
Requires Python 3.10+.
git clone https://github.com/cdzombak/plex-meta-migrator.git
cd plex-meta-migrator
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python plex_meta_migrator.py
The program will interactively:
After successful MyPlex authentication, your auth token is cached in .creds.json. On subsequent runs, the cached token is used automatically.
Set the PLEX_CREDS_FILE environment variable to change the credentials file location. Delete .creds.json to clear cached credentials.
-v, --version Show version and exit
--playlist Migrate a playlist instead of metadata
Source server (direct connection):
--source-url URL Source Plex server URL
--source-token TOKEN Source Plex authentication token
Destination server (direct connection):
--dest-url URL Destination Plex server URL
--dest-token TOKEN Destination Plex authentication token
MyPlex authentication:
-u, --username USER Plex.tv username
-p, --password PASS Plex.tv password
GNU GPL v3; see LICENSE in this repository.
Chris Dzombak
Content type
Image
Digest
sha256:13089b230…
Size
45.8 MB
Last updated
9 months ago
docker pull cdzombak/plex-meta-migrator