Migration tool for migrating album and favorites data from photoprism to immich
Project description
[!NOTE] Compatibility:
v0.0.5 → Immich version 1.106.x - latest
v0.0.4 → Immich version 1.105.x
v0.0.2 → Immich version 1.93.x - 1.104.x
Photoprism to Immich migrator
This tool can migrate albums and favorites from Photoprism to Immich. It does not migrate your photo files.
Prerequisites
- The tool will only work if you keep the same file structure in immich that you already had in photoprism. This is the case if you take the
originals
folder from photoprism and use it in immich as external library. - Photoprism and Immich must both be running at the same time, because the tool communicates with both APIs.
How it works
Migrate favorites
- The tool fetches all photos with a
favorite
tag from your photoprism instance - For each photo, it retrieves the original
filename
and its respectivepath
- It connects to immich, tries to find the photo by
filename
and validates potential candidates on the immich side by comparing the filepath
- If a match was found, it marks the photo on immich as
favorite
Migrate album
- The tool fetches all photos of a certain
album
from your photoprism instance - For each photo, it retrieves the original
filename
and its respectivepath
- It connects to immich, tries to find the photo by
filename
and validates potential candidates on the immich side by comparing the filepath
- If a match was found, it creates a new
album
in immich and adds the matched photos
Migrate all albums
- The tool fetches all albums from your photoprism instance (1000 albums by default)
- For each album found, the migration is launched as described per the previous paragraph.
Installation
pip install ppim-migrator
Configuration
Create a config.yaml
file in the working directory where you want to run the command.
photoprism:
base_url: https://photoprism.example.com
username:
password:
immich:
base_url: https://immich.example.com
api_key:
Notes:
- The PhotoPrism account must not have two factor authentication enabled
base_url
must not end with a slash
Usage
Migrate all favorites from photoprism to immich
python -m ppim-migrator migrate-favorites
Migrate a certain album from photoprism to immich
To get an album-id
just open the album in photoprism. The id is part of the url.
Example:
- Url, when opening the album:
https://photoprism.example.com/library/albums/aqrcixa2uf1q45iq/view
Thealbum-id
would beaqrcixa2uf1q45iq
python -m ppim-migrator migrate-album <album-id-here>
Migrate all albums from photoprism to immich
python -m ppim-migrator migrate-all-albums
You can overwrite the default 1000 albums cap, by adding a --count=
option:
python -m ppim-migrator migrate-all-albums --count=5000
Migrate JPG+RAW stacks from photoprism to immich
Since Immich does not support auto stacking yet, these stacks can be migrated over from photoprism.
python -m ppim-migrator migrate-stacked-raws
You can overwrite the default 100000 photos cap, by adding a --count=
option:
python -m ppim-migrator migrate-stacked-raws --count=200000
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ppim_migrator-0.0.8.tar.gz
.
File metadata
- Download URL: ppim_migrator-0.0.8.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e42e4a77d47e3927acc6cf2d4c6090ff0f85d9d08feab503eda89be803cb182b |
|
MD5 | 314a97dc883e7b54488d9ed6a35b0330 |
|
BLAKE2b-256 | 128c4cb00bd8433404ddc3ee99813a5e0bfb8e19d23f2ccaef711318bf4feb10 |
File details
Details for the file ppim_migrator-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: ppim_migrator-0.0.8-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a984a5c9c6b56e0c6b87802787bbbacb8048122442d45dadddd3e65f76ebd17 |
|
MD5 | 7567346408aafe552d4a81ad48db45be |
|
BLAKE2b-256 | 7a7237c2301891a3549a03d54eb78703b4c196e9c31b1486d24767531694f1f2 |