+++ date = 2024-03-21 title = "Import Google Photos Takeout into Immich" tags = ["protip", "immich", "photos"] +++ Okay, importing into Immich from a Google Photos Takeout is _super easy_. Well, it is if you're familiar with a CLI. ## Prepare your takeout There are two options for getting your Google Photos Takeout ready for importing: - Export as `.zip` (any size, bigger is better) - Export as `.tgz` (any size, bigger is better) and [extract as per my previous post](/2024/03/20/how-to-extract-multiple-.tgz-google-takeout-archives/) ## Getting `immich-go` [`immich-go`](https://github.com/simulot/immich-go) is a single binary command line tool for importing photos and videos into Immich. It has awesome support for Google Photos takeout archives. You should get the latest `immich-go` release for your platform from [Immich github releases](https://github.com/simulot/immich-go/releases). I dropped the executable into where I extracted my takeout archives. ``` -rwxrwxr-x 1 ariejan ariejan 8.5M Mar 20 18:45 immich-go drwxrwxr-x 3 ariejan ariejan 4 Mar 20 14:57 Takeout ``` ## Getting your Immich API key Go to your Immich account settings (click your avatar at the top right). Then select API Keys and create a new key. You probably already know your Immich url, which might optionally require a port number, depending on your setup. ## Dry-run First, let's do a dry run. This will read your Takeout archives and test the connection to Immich. It will spit out a lot of info about what's going to be imported, skipped, etc. ``` ./immich-go \ -server=https://immich.devroom.io \ -key=Ir3za64rggrbK3zSIhDfskw8R9b97GTljPPK5NlIEY \ upload \ -dry-run \ -create-albums \ -google-photos \ Takeout/ ``` `-create-albums` will re-create your Google Photos albums, which is probably what you want. In this case I'm providing an extracted Takeout archive, so I need to specify the `-google-photos` option. If you have `.zip` files, you can supply `takeout-*.zip` instead, and the `-google-photos` option is not strictly necessary. ## Importing for realz If you're happy what `immich-go` reported, go ahead and start your import. It can take a few hours, depending on how many photos and videos you want to import. ``` ./immich-go \ -server=https://immich.devroom.io \ -key=Ir3za64rggrbK3zSIhDfskw8R9b97GTljPPK5NlIEY \ upload \ -create-albums \ -google-photos \ Takeout/ ``` ## Result? All my photos and videos are now safely in Immich (backed up to a separate 3TB mirror; offline backup to a Hetzner Storagebox). ![](/images/2024/03/immich-usage.png)