garzj / google-photos-migrate

A tool to fix EXIF data and recover filenames from a Google Photos takeout, preserving albums within the directory structure.
https://npmjs.com/package/google-photos-migrate
MIT License
104 stars 11 forks source link

Discussion: Migrating is Copy or Move? #32

Closed alternativesurfer closed 3 months ago

alternativesurfer commented 3 months ago

Does this tool Copy or Move files to the new location? And, is there a flag to modify that?

I have had to restart my migration a couple times and I swear I keep seeing the same file names appear in the CLI as it runs and I don't have enough free space to manage a 5TB takeout if its copying the files.

garzj commented 3 months ago

This tool does not modify your Google Takeout directory at all. It holds the paths to the restructured destination folders in memory and patches the files using ExifTool while copying them over as it runs. Also, its progress is not tracked across restarts, so if you rerun the migration, it starts from the beginning.

Currently, there is no flag to change these behaviours, but it might not be that hard to implement one. I think an easy way would be to:

This would track the progress by default, but it comes with a lot more risk. Even automated code tests for this repository may not catch every bug, especially if ExifTool does something weird during migration.

The general recommendation is to create a backup either way and check your results, so you might be better off running the flat migration album per album. But if you know some TypeScript you can of course try and give this a shot (?).

alternativesurfer commented 3 months ago

Thank you!