Download the PHP package dsuurlant/takeout-redate without Composer
On this page you can find all versions of the php package dsuurlant/takeout-redate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dsuurlant/takeout-redate
More information about dsuurlant/takeout-redate
Files in dsuurlant/takeout-redate
Package takeout-redate
Short Description A Symfony Console CLI tool to restore filesystem timestamps for Google Takeout media from JSON metadata.
License MIT
Informations about the package takeout-redate
Takeout Redate CLI
A Symfony Console application to recursively go through your Google Photos Takeout archive and rewrite the file dates according to the accompanying metadata json.
Requirements
- PHP 8.4 or higher
Recommended Usage with Google Photos Takeout
When exporting your Google Photos archive, the ZIP files strip the original creation and modification dates from your photos and videos. However, these dates are preserved in the accompanying JSON metadata files. This tool restores those dates programmatically.
Overview
The process involves three main steps:
- Obtain and extract your Google Photos Takeout archive
- Consolidate all files into a single directory structure
- Restore dates using this tool
Step 1: Obtain Your Archive
- Request your Google Photos archive from Google Takeout
- Download all ZIP files before they expire (archives have expiration dates)
- Choose a storage location:
- Recommended: Local device or NAS for faster processing
- Not recommended: Directly to another cloud service (too slow)
Important: If you do not download the entire archive before expiration, a newly requested Takeout archive will not have the same file distribution across different ZIPs, resulting in potential data loss. Make sure to download your entire archive before the expiration date.
Step 2: Extract and Consolidate
-
Extract all ZIP files from your download
-
Consolidate the extracted directories.
On macOS: If files are split into multiple "Takeout 1", "Takeout 2", etc. directories, use this script to merge them:
On other platforms: Files may automatically merge into a single directory, or you can manually combine them.
Note: Google may distribute metadata JSON files across different ZIP archives, meaning a photo's metadata might not be in the same archive as the photo itself. You must have the entire archive extracted and consolidated before running the date restoration tool.
Step 3: Restore Dates
Google exports photos organized by year:
Recommended approach: Process one year at a time to avoid timeouts with large archives.
For each year directory:
-
Set your base directory (optional, for convenience):
-
Test with dry-run first:
-
If no errors, run for real and optionally delete metadata files after processing:
- Repeat for each year directory in your archive
Happy archiving and good luck moving away from Google!
Installation
As PHAR
Download the compiled PHAR file and make it executable:
Or use it directly:
Usage
Development
License
MIT