I need to open, view, and recover information in the Photos database

I have an old, backed up version of my Photos library that contains about 2 years worth of lost photos, which for some reason disappeared from my iCloud photos account. I can load this Photos library on my Mac and I can view the photos, but when I try to "export" them it gives an error: "Unknown Error (-1)". When I try to edit one of these photos with an external application it fails with the error "The operation couldn’t be completed. (PHPhotosErrorDomain error -1.)"


As far as I understand, and please correct if this is wrong, this error means that the photos library doesn't have the unmodified originals for these photos - only a derivative.


I desperately want to recover these photos. I don't have an older backup that I can recover them from - this is the oldest one I have. I can "view" them in the library, but that's it.


I can open the library package contents and see the "originals" folder and the "derivatives" folder. I'm assuming that the photos appearing in the library actually correspond to .jpeg files in the "derivatives" folders. I want to find them - the problem is that there are about 37,000 jpeg files in here. I'm missing about 5,000. None of these files contain date or location stamps - though the dates and locations are visible when I open the old Photos library, so clearly that information isn't lost.


I'm assuming I could go through this 37,000 block of files and try to identify ones that correspond to the missing pictures, and then manually edit date and location tags to recover that information - this seems like it would take weeks if not months of work. I'm hoping there's a quicker way. Ideally I'd like to figure out a way to export the derivatives from the Photos library, carrying out the time and location info. Alternatively it would at least shorten the manual recovery if I could somehow see the database information in table format - ideally I'd like to see a table that shows the date each photo was taken, the location and filename of it's "original" within the library package, the location of it's derivative, and maybe the geolocation stamp. Then I could sort to find the ones that are missing - either by giving a rough date range, or identifying ones that don't have an "original" entry.


Can anyone advise of a faster way to accomplish this job? These are pictures of my wife and I when we were newly married, and our first children when they were babies. In short they have immense sentimental value and I'm seriously tempted to put in months of work recovering them manually, regardless, if there is no other way. I'm just really hoping there's a faster way.

MacBook Pro 16″, macOS 13.4

Posted on Jan 11, 2024 8:49 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 12, 2024 3:17 AM

You could try the paid version of PowerPhotos to import the broken library into a new, empty library. It has an option to import the edited versions, if the originals are not available.


But before you spend money on a tool, try to find out, if there is another reason why the originals cannot be found.

Is the "originals" folder empty? If not, Photos may not be be able to access the originals for another reason. Perhaps your Photos Library is on an unsupported external drive? Then try to move it to the Pictures folder.


Here is an example of the Settings in PowerPhotos:

Set the checkmark "Whatever version is available" to deal with missing originals.

Similar questions

2 replies
Question marked as Top-ranking reply

Jan 12, 2024 3:17 AM in response to kaxlen

You could try the paid version of PowerPhotos to import the broken library into a new, empty library. It has an option to import the edited versions, if the originals are not available.


But before you spend money on a tool, try to find out, if there is another reason why the originals cannot be found.

Is the "originals" folder empty? If not, Photos may not be be able to access the originals for another reason. Perhaps your Photos Library is on an unsupported external drive? Then try to move it to the Pictures folder.


Here is an example of the Settings in PowerPhotos:

Set the checkmark "Whatever version is available" to deal with missing originals.

Jan 14, 2024 9:19 AM in response to léonie

Doesn't appear to have worked. I purchased the application and attempted, and it still throws the same error when attempting to copy or export the images. I can see them just fine in the application, and they sort and display metadata correctly. They just won't export.


It's definitely not an issue with a Photos library on an external drive. I've manually opened this library, which I copied off time machine and put on my main hard drive. It's the oldest backup I have of my photos. For some reason, we noticed about a year or two ago, all these photos disappeared from iCloud. I found them here in this backup, but they won't export. I can view them only.


I've submitted a ticket to the PowerPhotos support - that really looked promising, and I was sad it didn't work. Maybe they'll be able to look at the log and come up with an idea. When I open up the package for the library I'm pretty sure the photos are located in "derivatives", but it's hard to be certain because there are just so many of them in there.


I'm wondering if there's a developer tool that would let me see the library objects and their attributes in a table format - i.e. a big spreadsheet that would let me see all the objects in the library, the filename/location of the original vs any edited versions within the package, and then columns to correspond with metadata entries. If I had to recover/reconstruct the photo information brute-force, that would at least make it much quicker and easier. The ideal option would be to write a script to go through the library object by object, identify objects that are throwing the error, and then pull the edited version (since clearly the Photos app has a version it's getting from somewhere) and then assign all the metadata to THAT jpeg and save it in a folder on the hard drive. Then I could export the entire library (which would only send out the good photos that don't throw errors), add in all the new "recovered" photos that the script had created, and build a new library that contains everything and then doesn't throw any errors since they'd all be seen as "originals". I could then merge that with my iCloud library and all the missing photos would be visible again.


My knowledge of scripting is very limited to a few months of hobby learning iOS programming a few years ago that never really went anywhere, but I image that learning would likely still be quicker than going through a 37k jpeg dataset manually to try to "recognize" pictures that are in the missing timeframe, and then trying to "find" them in the photos app (visually), so that I can then manually alter the metadata - that sounds like a nightmare job that would take months of long hours, and would still likely miss tons of photos.


I'm really hoping there's a simpler way. :-)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I need to open, view, and recover information in the Photos database

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.