Moving media from downloaded Apple Photos library into Synology Photos with a minimal metadata loss
2
votes
1
answer
139
views
**Problem:**
I have an almost 2TB Apple Photos library already downloaded onto an external drive. I wanted to migrate this library into Synology Photos without re-downloading it from the internet. Exporting originals from Apple Photos was too time-consuming and impractical. After some investigation, I discovered that the
.photoslibrary
file is essentially a regular folder containing an SQLite database and the original images and videos. So, I moved this file to my Synology NAS.
**Expected Outcome:**
I wanted to move the media files from the .photoslibrary/originals
directory into home/Photos
on my NAS, organized in a %Y/%m/%d
directory hierarchy. Ideally I would like to keep as much as possible metadata from Apple Photos.
**Solution:**
I created a program that:
1. Recursively loops through all files inside the originals
directory.
2. Queries a CSV file (exported from the ZASSET
table in the Apple Photos SQLite database). The CSV contains two columns: ZFILENAME
and ZDATECREATED
.
3. Converts ZDATECREATED
into %Y/%m/%d
format and creates/selects the appropriate folder inside home/Photos
.
4. Moves the file into that directory.
**Shortcomings:**
A significant number of files in the originals
directory have _2
, _3
suffixes before the extension, and the database does not have ZASSET
records for these files. How should I handle these?
In general, I'd like to hear suggestions from anyone who has done a similar migration of their Apple Photos library to Synology Photos. What is the best method with the least metadata loss?
Asked by Tural Ali
(237 rep)
May 27, 2024, 02:20 PM
Last activity: Jul 22, 2025, 08:02 AM
Last activity: Jul 22, 2025, 08:02 AM