Suggestions for Synology Users #157
Replies: 12 comments 51 replies
-
Sponsoring you for the year @TheLastGimbus as a thank you! |
Beta Was this translation helpful? Give feedback.
-
Nice of you! If you would want to, we could make some
Hmm, if you intend to leave them there, this shouldn't be an issue, because gpth copies each file, changes it's date and it's done - it doesn't modify them afterwards or anything. But yeah, you may want to stop this
Umm... ;_; Bro, you can just use cli options to skip whole desktop-enviroment-pickers stuff: $ unzip takeout.zip
$ gpth --input takeout/ --output my-photos/
# Should work perfectly on any distro Funny thing, gpth is recommended in offical synology faq 😅 https://kb.synology.com/en-in/DSM/tutorial/How_do_I_migrate_photos_from_Google_Photos although it's old python version
Big thanks! Will definietley enjoy some coding'n'pizza with this <3 |
Beta Was this translation helpful? Give feedback.
-
Hello, everyone. Thanks for your work. I do not understand many steps due to language and know how. I'm getting freak to fix this problem on my photo folder in synology. Is there some one that could explain me what to do step by step for running it? |
Beta Was this translation helpful? Give feedback.
-
CloudPhotoMigratorWelcome to CloudPhotoMigrator Tool: This tool has been designed to Interact and Manage different Photo Cloud Services. As of today, the Supported Photo Cloud Services are:
Apart from Interact with the different Photo Cloud Services, the Tool also contains some other useful features such as:
The Script is Multi-Platform and Multi-Architecture, and has been designed to be run directly within a Linux Server or NAS such as Synology NAS (Compatible with DSM 7.0 or higher), Download Latest Version:Download the script either Linux, MacOS or Windows version (for both x64/amd64 or arm64 architectures) as you prefeer directly from following links: Linux:: Mac OS: Windows: Instructions:You can copy and unzip the downloaded Script into any local folder or to any Shared folder of your server or Synology NAS. Then you just need to call it depending on your environment:
Syntax:
Examples of use:
In this example, the script will Process you Takeout Files found in folder './MyTakeout' (Unzipping them if needed) and fix
In this example, the script will Process your Takeout or Library of photos in folder './MyTakeout' (need to be unzipped) and will rename
This step is useful if you want to Upload all your Albums to a new Cloud Service and you would like to start with all the new Albums in a cleaner homogeneus way. Note Automated Migration FeatureFrom version 3.0.0 onwards, the script supports a new Extra Mode called -AUTO, --AUTOMATED-MIGRATION Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will automatically do the whole migration jon from <SOURCE> Cloud Service to <TARGET> Cloud Service.
To execute this Extra Mode, you can use the new Flag: '-AUTO, --AUTOMATED-MIGRATION <SOURCE> <TARGET>' Examples of use:
In this example, the script will do a FULLY-AUTOMATED job which has two steps:
Withh this example, the script will do a FULLY-AUTOMATED job which has two Note Google Photos SupportFrom version 1.0.0 onwards, the script can process your Google Photos Takeout files to fix timestamp, geodata, organize files per year/month, organize assets within album(s) in subfolders, etc...
For the time being, Google Photos Takeout support, does not need to include anything in the Config.ini, but it has it own section for futures features. Google Takeout Mode: Process Explained:The whole process will do the next actions if all flags are false (by default):
The result will be a folder (NAMED '<INPUT_TAKEOUT_FOLDER>{SUFIX}{TIMESTAMP}' by default, but you can or change the default suffix 'fixed' by any other using the option '-gofs, --google-output-folder-suffix ')
Finally, if you want to use your processed assets within Synology Photos, you just need to move OUTPUT_FOLDER into your /home/Photos folder and let Synology index all files (it will take long time). After that you will be able to explore your photos chronologycally on the Synology Photos App, and all your Albums will be there when you explore the library by folder instead of chronologycally. It was very useful for me when I run it to process more than 300 GB of Photos and Albums from Google Photos (408559 files zipped, 168168 photos/video files, 740 albums) and moved it into Synology Photos. The whole process took around ~8.5 hours (or ~3 hours without last two optional steps) and this is the time split per steps):
NOTE: Step 8 is disabled by default, and is only recommended if you want to save disk space and want to avoid having the same physical file in more than one folder (in case that the same file belongs to multiples Albums). Note Synology Photos SupportFrom version 2.0.0 onwards, the script can connect to your Synology NAS and login into Synology Photos App with your credentials. The credentials need to be loaded from 'Config.ini' file and will have this format:
Features included:
Delete Empty Albums in Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Delete Empty Albums in Synology Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will look for all Empty Albums in Synology Photos database. If any Empty Album is found, the script will remove it from Synology Photos. To execute this Extra Mode, you can use the Flag: '--synology-delete-empty-albums' Example of use:
With this example, the script will connect to Synology Photos database and will delete all Empty Albums found. Delete Duplicates Albums in Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Delete Duplicates Albums in Synology Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will look for all Duplicates Albums in Synology Photos database. If any Duplicated Album is found, the script will remove it from Synology Photos. To execute this Extra Mode, you can use the Flag: '--synology-delete-duplicates-albums' Example of use:
With this example, the script will connect to Synology Photos database and will delete all Duplicates Albums found. Upload Folder into Synology Photos:From version 3.0.0 onwards, the script can be executed in 'Upload Folder into Synology Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will upload all the asseets contained in <INPUT_FOLDER> that are supported by Synology Photos. The folder <INPUT_FOLDER> can be passed using the Flag: '-suf, --synology-upload-folder <INPUT_FOLDER>' Important <INPUT_FOLDER> should be stored within your Synology Photos main folder in your NAS. Typically, it is '/volume1/homes/your_username/Photos' and all files within <INPUT_FOLDER> should have been already indexed by Synology Photos before you can add them to a Synology Photos Album. You can check if the files have been already indexed accessing Synology Photos mobile app or Synology Photos web portal and change to Folder View. If you can't see your <INPUT_FOLDER> most probably is because it has not been indexed yet or because you didn't move it within Synology Photos root folder. Example of use:
With this example, the script will connect to Synology Photos database and process the folder ./MyLibrary and will upload all supported assets found on it. Upload Albums into Synology Photos:From version 2.0.0 onwards, the script can be executed in 'Create Albums in Synology Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Synology Photos database and will create one Album per each Subfolder found in <ALBUMS_FOLDER> that contains at least one file supported by Synology Photos and with the same Album name as Album folder. The folder <ALBUMS_FOLDER> can be passed using the Flag: '-sua, --synology-upload-albums <ALBUMS_FOLDER>' Important <ALBUMS_FOLDER> should be stored within your Synology Photos main folder in your NAS. Typically, it is '/volume1/homes/your_username/Photos' and all files within <ALBUMS_FOLDER> should have been already indexed by Synology Photos before you can add them to a Synology Photos Album. You can check if the files have been already indexed accessing Synology Photos mobile app or Synology Photos web portal and change to Folder View. If you can't see your <ALBUMS_FOLDER> most probably is because it has not been indexed yet or because you didn't move it within Synology Photos root folder. Example of use:
With this example, the script will connect to Synology Photos database and process the folder ./My_Albums_Folder and per each subfolder found on it that contains at least one file supported by Synology Photos, will create a new Album in Synology Photos with the same name of the Album Folder Download Albums from Synology Photos:From version 2.3.0 onwards, the script can be executed in 'Download Albums from Synology Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect to Synology Photos and Download those Album(s) whose name is in <ALBUMS_NAME> to the folder 'Synology_Photos_Albums' within the Synology Photos root folder. To extract several albums you can separate their names by comma or space and put the name between double quotes. i.e: --synology-download-albums "album1", "album2", "album3". You can also use wildcarts. i.e --synology-download-albums Mery To extract ALL Albums within in Synology Photos database use 'ALL' as <ALBUMS_NAME>. The album(s) name <ALBUMS_NAME> can be passed using the Flag: '-sda, --synology-download-albums <ALBUMS_NAME>' Important <ALBUMS_NAME> should exist within your Synology Photos Albums database, otherwise it will no extract anything. Example of use:
With this example, the script will connect to Synology Photos database and extract the Albums "Album 1", "Album 2", "Album 3" with all the photos and videos included on them into a subfolder of 'Synology_Photos_Albums' folder Note Immich Photos SupportFrom version 3.0.0 onwards, the script can connect to your Immich Photos account with your credentials or API. The credentials/API need to be loaded from 'Config.ini' file and will have this format:
Features included:
Delete Empty Albums in Immich Photos:From version 3.0.0 onwards, the script can be executed in 'Delete Empty Albums in Immich Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Immich Photos database and will look for all Empty Albums in Immich Photos database. If any Empty Album is found, the script will remove it from Immich Photos. To execute this Extra Mode, you can use the Flag: '--immich-delete-empty-albums' Example of use:
With this example, the script will connect to Immich Photos database and will delete all Empty Albums found. Delete Duplicates Albums in Immich Photos:From version 3.0.0 onwards, the script can be executed in 'Delete Duplicates Albums in Immich Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Immich Photos database and will look for all Duplicates Albums in Immich Photos database. If any Duplicated Album is found, the script will remove it from Immich Photos. To execute this Extra Mode, you can use the Flag: '--immich-delete-duplicates-albums' Example of use:
With this example, the script will connect to Immich Photos database and will delete all Duplicates Albums found. Upload Folder into Immich Photos:From version 3.0.0 onwards, the script can be executed in 'Upload Folder into Immich Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Immich Photos database and will upload all the asseets contained in <INPUT_FOLDER> that are supported by Immich Photos. The folder <INPUT_FOLDER> can be passed using the Flag: '-iuf, --immich-upload-folder <INPUT_FOLDER>' Important <INPUT_FOLDER> should be stored within your Immich Photos main folder in your NAS. Typically, it is '/volume1/homes/your_username/Photos' and all files within <INPUT_FOLDER> should have been already indexed by Immich Photos before you can add them to a Immich Photos Album. You can check if the files have been already indexed accessing Immich Photos mobile app or Immich Photos web portal and change to Folder View. If you can't see your <INPUT_FOLDER> most probably is because it has not been indexed yet or because you didn't move it within Immich Photos root folder. Example of use:
With this example, the script will connect to Immich Photos database and process the folder ./MyLibrary and will upload all supported assets found on it. Upload Albums into Immich Photos:From version 3.0.0 onwards, the script can be executed in 'Create Albums in Immich Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect automatically to your Immich Photos database and will create one Album per each Subfolder found in <ALBUMS_FOLDER> that contains at least one file supported by Immich Photos and with the same Album name as Album folder. The folder <ALBUMS_FOLDER> can be passed using the Flag: '-iua, --immich-upload-albums <ALBUMS_FOLDER>' Important <ALBUMS_FOLDER> should be stored within your Immich Photos main folder in your NAS. Typically, it is '/volume1/homes/your_username/Photos' and all files within <ALBUMS_FOLDER> should have been already indexed by Immich Photos before you can add them to a Immich Photos Album. You can check if the files have been already indexed accessing Immich Photos mobile app or Immich Photos web portal and change to Folder View. If you can't see your <ALBUMS_FOLDER> most probably is because it has not been indexed yet or because you didn't move it within Immich Photos root folder. Example of use:
With this example, the script will connect to Immich Photos database and process the folder ./My_Albums_Folder and per each subfolder found on it that contains at least one file supported by Immich Photos, will create a new Album in Immich Photos with the same name of the Album Folder Download Albums from Immich Photos:From version 3.0.0 onwards, the script can be executed in 'Download Albums from Immich Photos' Mode. If you configure properly the file 'Config.ini' and execute this Extra Mode, the script will connect to Immich Photos and Download those Album(s) whose name is in <ALBUMS_NAME> to the folder 'Immich_Photos_Albums' within the Immich Photos root folder. To extract several albums you can separate their names by comma or space and put the name between double quotes. i.e: --immich-download-albums "album1", "album2", "album3". You can also use wildcarts. i.e --immich-download-albums Mery To extract ALL Albums within in Immich Photos database use 'ALL' as <ALBUMS_NAME>. The album(s) name <ALBUMS_NAME> can be passed using the Flag: '-ida, --immich-download-albums <ALBUMS_NAME>' Important <ALBUMS_NAME> should exist within your Immich Photos Albums database, otherwise it will no extract anything. Example of use:
With this example, the script will connect to Immich Photos database and extract the Albums "Album 1", "Album 2", "Album 3" with all the photos and videos included on them into a subfolder of 'Immich_Photos_Albums' folder Note Other Standalone FeaturesAdditionally, this script can be executed with 4 Standalone Extra Modes:
If more than one Stand Alone Extra Mode is detected, only the first one will be executed Extra Mode: Find Duplicates:From version 1.4.0 onwards, the script can be executed in 'Find Duplicates' Mode. In this mode, the script will find duplicates files in a smart way based on file size and content:
Example of use:
With this example, the script will find duplicates files within folders ./Albums and ./ALL_PHOTOS, Extra Mode: Process Duplicates:From version 1.6.0 onwards, the script can be executed in 'Process Duplicates' Mode. In this mode, the script will process the CSV generated during 'Find Duplicates' mode and will perform the Action given in column Action for each duplicated file.
Example of use:
With this example, the script will process the file ./Duplicates/Duplicates_revised.csv Extra Mode: Fix Symbolic Links Broken:From version 1.5.0 onwards, the script can be executed in 'Fix Symbolic Links Broken' Mode.
Example of use:
With this example, the script will look for all symbolic links within OUTPUT_FOLDER and if any is broken, Extra Mode: Folder Rename Content Based:From version 2.0.0 onwards, the script can be executed in 'Rename Albums Folders' Mode. With this Extra Mode, you can rename all Albums subfolders (if they contains a flatten file structure) and homogenize all your Albums names with this format: 'yyyy - Album Name' or 'yyyy-yyyy - Album Name', where yyyy is the year of the files contained in each Album folder (if more than one year is found, then yyyy-yyyy will indicate the range of years for the files contained in the Album folder.) To define the <ALBUMS_FOLDER> you can use the new Flag: -ra, --rename-albums <ALBUMS_FOLDER> Recommendation: Use this Extra Mode before to create Synology Photos Albums in order to have a clean Albums structure in your Synology Photos database. Example of use:
With this example, the script will rename all subfolders within ./My_Albums_Folder (only first subfolder level) according to the format described above. If the subfolder does not contain any file, the folder will not be renamed. Tip Additional Trick!When prepare Google Takeout to export all your Photos and Albums, select 50GB for the zip file size and select Google Drive as output for those Zip files. On this way you can just Download all the big Zip files directly on your Synology NAS by using the Tool Cloud Sync (included on Synology App Store) and creating a new synchronization task from your Google Drive account (/Takeout folder) to any local folder of your Synology NAS (I recommend to use the default folder called 'Zip_files' within this script folder structure) I hope this can be useful for any of you. Credits(c) 2024-2025 by Jaime Tur (@jaimetur). |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the great work in primis!!
btw:
Getting this "cannot execute binary file: Exec format error"
I followed all the instruction.. I'm on a Mac by ssh Synology.
Files under Zip_Files
command that I used: ./OrganizeTakeoutPhotos --zip-folder ./Zips --takeout-folder ./Takeout --albums-structure year/month
Any help?
|
Beta Was this translation helpful? Give feedback.
-
In Windows you have you use back slash “\” instead of “/“ and you don’t need to start the command with ./
El 4 ene 2025, 15:13 +0100, vixius ***@***.***>, escribió:
… > If you want to run it from Windows you should open a CMD or PowerShell terminal and execute the script with the propper arguments. FYI: I'm working on a Linux_arm64 version. Hopefully I could finish it soon. Keep you posted.
Where is the mistake :( ?
image.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks.
Yes, you can check duplicates in any folder(s). You can provide one or more folder and the script will look for duplicates in all of them. Give more priority to the file found in the first folder. Check the —help section or the readme.md for more info.
El 6 ene 2025, 22:09 +0100, vixius ***@***.***>, escribió:
… > Happy to see that at least Windows version works for you. Can you try now to download linux_arm64 versoin and let me know if it works?
Yeeees It works like a charme, Great Job! I'd like to offer you a beer!
Is there a way to check duplicates inside photo folder in nas? Because now I have some foto from iPhone already in photo folder in as and other from google takeout. But is it possible to do a duplicate check directly on photo folder on nas?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Added Release 2.3.0 to OrganizeTakeoutPhotos Script Release Notes:Release: 2.3.0
Download Script:Download the script either Linux, MacOS or Windows version (for both x64/amd64 or arm64 architectures) as you prefeer directly from following links: Linux:: Mac OS: Windows: Full Changelog: jaimetur/CloudPhotoMigrator@1.2.0...2.3.0 |
Beta Was this translation helpful? Give feedback.
-
Hello! First of all, thank you for your work @jaimetur. I did everything on my PC and it works like a charm. I'm stuck at the last step, the extra mode -ca to create the albums on Synalogy Photos. I tried it on version 2.2.1 and 2.3.0, but I'm getting connection errors. My Synology.config file is properly configurated and I tried both in Powershell SSH running on Windows and Linux ARM versions and the result is the same. I've disabled firewall, and 2-factor authentication with no results. The indexing service is properly started on my NAS as stated in the log but I'm getting the error. Can you help me? |
Beta Was this translation helpful? Give feedback.
-
Hi new to Synology, been awhile since I’ve worked with Linux. Connecting to a DS223 (DSM Ver 7.2.2-72806) with an M2 Mac Mini via SSH. Script version 2.3.0_linux_arm64. I have the script folder in the same folder as the Takeout Folder. Used the following command. Got to Step 3 and encountered the following error Any help/guidance would be appreciated. TIA |
Beta Was this translation helpful? Give feedback.
-
Are you sure that you are using the right architecture? Can you try with amd64 instead of arm64?
On the other hand, is not a good idea to run the script from the same takeout folder, I would move it on folder up, because there is some options that make the script to delete takeout folder when finish.
|
Beta Was this translation helpful? Give feedback.
-
Download Latest Version:Linux:: Mac OS: Windows: Release Notes:Release: 3.0.0
|
Beta Was this translation helpful? Give feedback.
-
Thanks for this script, this is super helpful. I'm running a Synology and thought I'd contribute a couple tips that others might find useful.
./gpth-linux
from SSH, it likely won't work because (I believe) it is expecting a typical linux window environment. What worked for me was to run this on another machine and select the folders over the Samba share, so mount thesmb://synology
, selectphoto
or some other directory, then running./gpth-macos
Beta Was this translation helpful? Give feedback.
All reactions