Skip to content
Coding breakthrough

JavaScript · Docker · NAS

How to move your photos and video from Google Photos to a Synology NAS

Eugene Gavrilov

6 min read
  • NAS & storage
Circular illustration of Google Photos, a Takeout photo with two JSON files, and the imported photo in Synology Photos

Moving your photos and videos from Google Photos to a Synology NAS (Network Attached Storage) is a great way to have more control over your data, ensure privacy, and avoid cloud storage costs. This guide will walk you through the process step-by-step, ensuring a smooth transition of your precious memories.

Step 1: Prepare Your Synology NAS

Before starting the transfer process, make sure your Synology NAS is set up and connected to your network.

  1. Initial Setup: Follow the Synology setup wizard to initialize your NAS, create an admin account, and install the DiskStation Manager (DSM) software. Then install Synology Photos from Package Center.
  2. Prepare Your Photo Folder: In DSM, go to Control Panel > User & Group > Advanced > User Home and enable the user home service. Open Synology Photos with your usual account to use Personal Space, where your photos are stored in /home/Photos.
  3. Enable File Services: Ensure SMB, AFP, or NFS file services are enabled under Control Panel > File Services. This will allow your computer to connect to the NAS.

Step 2: Download Your Data from Google Photos

To transfer your data from Google Photos, you'll need to use Google Takeout, a service provided by Google to export your data.

  1. Go to Google Takeout: Visit Google Takeout.
  2. Select Data to Export: Deselect everything, then scroll down to find Google Photos. Select it and choose the specific albums you want to export or leave it to export all.
  3. Choose Export Format: Select the delivery method (e.g., add to Drive, send download link via email) and the file type and size (e.g., .zip, .tgz). It's usually best to select .zip and a file size that your system can handle comfortably.
  4. Create Export: Click on "Create Export". Google will compile your photos and videos, which may take some time depending on the amount of data.

Step 3: Download and Unzip the Exported Files

Once Google Takeout completes the export, you’ll receive an email with a link to download your data.

  1. Download Files: Click on the link provided in the email to download the exported files to your computer. Make sure you download every part of the export.
  2. Unzip Files: Extract the .zip files to a local folder on your computer. Ensure you have enough storage space to accommodate the extracted files. Keep the JSON files with your photos and leave the original archives unchanged.
  3. Restore Photo Details: Use the ExifTool recipe from the PhotoDrain guide to add missing dates, descriptions, and locations from the JSON files to your photos. Synology Photos cannot read this information directly from Takeout’s JSON files.
  4. Try a Few Photos First: Start with a small working copy and check that the dates, descriptions, and locations look right. Once you are happy with the result, you can prepare the rest of your photos.

Restore photo metadata with ExifTool

Install ExifTool on your computer. On macOS or Linux, open Terminal and run the following command, replacing /path/to/working-copy with the path to your sample folder. Keep each photo and its matching JSON file together.

exiftool -r -wm cg \
  -ext jpg -ext jpeg -ext heic -ext heif -ext png -ext webp -ext tif -ext tiff -ext avif \
  -file1 "%d%F.supplemental-metadata.json" \
  -d "%s" "-EXIF:DateTimeOriginal<File1:PhotoTakenTimeTimestamp" \
  "-EXIF:ImageDescription<File1:Description" "-XMP-dc:Description<File1:Description" \
  '-GPSPosition<${File1:GeoDataLatitude;
    my ($lat)=values %{$self->GetInfo("File1:GeoDataLatitude")};
    my ($lon)=values %{$self->GetInfo("File1:GeoDataLongitude")};
    $_=undef if keys %{$self->GetInfo("GPS:all")}
      or !defined $lat or !defined $lon
      or $lat!~/^-?\d+(\.\d+)?\z/ or $lon!~/^-?\d+(\.\d+)?\z/
      or abs($lat)>90 or abs($lon)>180 or ($lat==0 and $lon==0)
  } $File1:GeoDataLongitude' \
  '-GPSAltitude<${File1:GeoDataAltitude;
    my ($lat)=values %{$self->GetInfo("File1:GeoDataLatitude")};
    my ($lon)=values %{$self->GetInfo("File1:GeoDataLongitude")};
    $_=undef if keys %{$self->GetInfo("GPS:all")}
      or !defined $lat or !defined $lon
      or $lat!~/^-?\d+(\.\d+)?\z/ or $lon!~/^-?\d+(\.\d+)?\z/
      or abs($lat)>90 or abs($lon)>180 or ($lat==0 and $lon==0)
  }' \
  '-GPSAltitudeRef<${File1:GeoDataAltitude;
    my ($lat)=values %{$self->GetInfo("File1:GeoDataLatitude")};
    my ($lon)=values %{$self->GetInfo("File1:GeoDataLongitude")};
    $_=undef if keys %{$self->GetInfo("GPS:all")}
      or !defined $lat or !defined $lon
      or $lat!~/^-?\d+(\.\d+)?\z/ or $lon!~/^-?\d+(\.\d+)?\z/
      or abs($lat)>90 or abs($lon)>180 or ($lat==0 and $lon==0)
  }' \
  "/path/to/working-copy"

Check the names of your JSON files. If they look like IMG_0001.JPG.json, replace %d%F.supplemental-metadata.json with %d%F.json. Shortened or numbered names need separate matching; changing the suffix alone will not fix them.

The command fills missing dates, descriptions, and GPS information for the photo formats listed. Existing dates, descriptions, and GPS are left in place. Empty or invalid coordinates, including 0,0, are skipped. ExifTool saves the original version of each changed photo as an _original file.

Read any warnings before continuing. A photo left unchanged may simply be missing its matching JSON file. Use this command to check a prepared photo, replacing the sample path:

exiftool -s -DateTimeOriginal -GPSPosition -GPSAltitude \
  -ImageDescription -XMP-dc:Description "/path/to/sample.jpg"

Compare the details with the JSON file and a photo you recognize. Times are converted using your computer’s time zone.

After checking the capture dates, you can optionally use them as the files’ modified dates. This can help when Synology Photos falls back to a file date. The following command changes the modified dates and creates no additional backup:

exiftool -r -ext jpg -ext jpeg -ext heic -ext heif -ext png -ext webp -ext tif -ext tiff -ext avif \
  -if '$EXIF:DateTimeOriginal' \
  "-FileModifyDate<EXIF:DateTimeOriginal" "/path/to/working-copy"

Upload only the prepared media. Keep the JSON files and _original backups in your working folder. Videos, Live and Motion Photos, duplicates, albums, and incorrect dates already stored in photos need separate handling.

Step 4: Transfer Files to Synology NAS

Now that you have your photos and videos downloaded and extracted, it’s time to transfer them to your Synology NAS.

  1. Connect to NAS: On your computer, connect to your Synology NAS using SMB, AFP, or NFS. On Windows, you can do this by opening File Explorer and entering the NAS’s IP address (e.g., \192.168.1.100). On macOS, use Finder > Go > Connect to Server.
  2. Locate Photo Folder: Navigate to your home/Photos folder on the NAS and create a folder for the import.
  3. Transfer Files: Drag and drop the prepared photos and videos from your local drive to this folder on your NAS. This process might take some time depending on the size of your data and network speed.

Step 5: Organize and Access Your Media

After transferring your files, you can organize and access your media on your Synology NAS.

  1. Use Synology Photos: Synology Photos helps you manage and view your photos and videos. Open the application in DSM and select Personal Space.
  2. Index Media: Once the files are transferred, let Synology Photos index your media. This might take some time but will allow you to easily browse and search your photos and videos.
  3. Check Your Library: Browse a few familiar photos to check their dates and locations, and play some videos. Use your Takeout folders as a reference when recreating albums.

Moving your photos and videos from Google Photos to a Synology NAS gives you greater control and privacy over your data. By following these steps, you can ensure a smooth and efficient transfer process. Enjoy the peace of mind that comes with having your precious memories safely stored and easily accessible on your own NAS.