Migrating from Google Photos to Immich Via Google Takeout

Reading Time: 5 minutes
In an ideal world Google Photos, iCloud Photos, MyCloud (Swisscom) and other photo backup solutions would back up your photos into a directory structure that you can access and download from with ease and convenience. Unfortunately non of them want to offer that. That is why finding a workflow to get data out is worthwhile.

Remember, a cloud solution, where you can't get media files back out, is not a backup solution. It's just a synching solution. That's why Immich and kDrive are interesting alternatives.

The Problem

If you're like me you have been taking videos and photos for decades and in that time you have taken gigabytes worth of photos and terabytes worth of video. If we save everything to a hard drive then we're fine but because we're in the age of laptops and mobile phones we're backing up to the cloud, and applications are offloading our data from MacOS, iOS and Android. The result is that we no longer have local copies of files and that's where Google Takeout comes in.

Google Takeout

Google Takeout is a tool provided by Google One to export data from Google services to have a local backup. A few years ago when I first considered leaving Google One for kDrive, because that solution was cheaper I found that exporting all my data would be time consuming.

The reason for this is that I had over a hundred zip files to download from Google Drive and that would take hours, if not days to do. Instead, at the time, I was able to backup Google Photos directly to Infomaniak kDrive. With kDrive I could download the files automatically via the kDrive desktop app. I won't elaborate any further because that solution is no longer available.

Takeout Options

Google Takeout gives you the option of downloading 1GB, 2GB, 10GB, 50GB zip files and more. If you have 360 GB of files, as I do, the most convenient solution is to download the 50GB files as you only have eight files to download. With the 2gb version I would have had 186 files to download. It takes half a day or more for the files to be ready.

Unzipping and Metadata

Safari will want to automatically "open" the zip files but I chose not to have this option because I want to keep the zips. I downloaded all eight files, and before doing anything else I backed up the eight files to a second disk as a backup. I then unzipped all eight zips. This takes time so let it work overnight. This is a good time to work on something else.

Folders and Json

Google Takeout creates directories for each album but it also creates albums per year. This means that plenty of files are duplicated, at the very least.

My natural instinct, as a media asset manager was to see this file organisation and tidy up. Don't make this mistake if you're going to use Immich CLI or Exif tool. The mistake is not critical but if you want to save time then it is not required.

The JSON files that are created by Google Takeout expect the folder structure that it creates. If you tidy things up then Exif tool will look for files and not find them because it's looking in "Google Takeout 5" whereas you have everything in "Google Takeout". The result is that exif will fail to update exif data for thousands of photos.

Getting AI Help

Using the Exif tool might be daunting, and that's where Google Gemini or another AI solution can help. Sometimes you can read the fabulous manual but feel confused. With Gemini, Le Chat by Mistral, or other you can ask for help and it will.

Of course, with AI, it might say "Use this prompt" and it might be wrong. That's why it's good to test on a small folder first, see if there are any errors. If you see there are errors you can fix them. When things work well, then you can try in a second and third directory.

The Limitation

With event specific folders that span a single folder this approach worked fine but it's when I was exporting "photos from 2010" that I noticed that it was looking for the folder structure that I had habitually destroyed as a media asset manager.

That's why you keep the zip files. With the zip files intact you can extract the files and folders and start again, this time knowing that the command prompt is the right one and you can let Exif tool work in the background.

Double Checking

When Exiftool is done there are three ways to see if the operation was a success. The first is the summary after running the command. The second is to check individual files to see if the creation date is correct and the first test is to upload to immich and see if the files are uploaded with the correct date and time. When these three steps are complete you can scale up.

Populating Immich

The Fun part is when you start populating Immich. It is gratifying to see images sorted by date and time and for people to be recognised, and for us to see if we remember the names of friends from 15-20 years ago. It's also fun to see how mobile phones and photo cameras have improved over the years. It's also nice not to be trapped by iCloud or Google Photos anymore.

Have a Test Instance or a Test Account

I recommend having a test instance of Immich or at the very least a test account. If something goes wrong it's better to see it go wrong on a test instance rather than in production. I'd rather make sure all photos load into the right year, before seeing thousands of photos added to the day the Google Takeout archive was created.

Things to Watch Out For

Duplicates: If you edited the rotation, adjusted histograms or anything else you might have three or four copies of the same image showing up.

Creation Date: With some photos I found that they are sorted by the creation date for the zip, rather than their original creation date. In these cases it's worth checking to see if they are duplicates or if you need to correct the date and time information.

Keep the Zips: If you make a mistake you can start over

Keep the file and folder structure: The JSON files are optimised for Google Takeout Folder structures.

Test Small and then scale up

And Finally

When I hit the 200 GB limit many years ago I upgraded to the 2TB plan and I was happy with it, but I didn't use all of that space so I was paying for more than I needed. As many people have said before me, if iCloud, Google One and other solutions had more tiers then we could upgrade one small step at a time, rather than catapulting from 200 GB to Terabytes.

Another point is that with larger file export sizes breaking out of Google Photos is almost easy, in contrast to before. When you had too download hundreds of zip files, unzip them, and then re-consolidate everything you were speaking of a huge investment in time. Now, within a day or two, you can be out of Google Photos and into Immich.

One of my key reservations about using cloud synching tools as a backup solution is that it was very hard to get data out, whereas now it is considerably easier.

Upon completion of this process, if I tidy up my e-mails I could revert to Google's free tier.