PHPackages                             dsuurlant/takeout-redate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. dsuurlant/takeout-redate

ActiveProject[CLI &amp; Console](/categories/cli)

dsuurlant/takeout-redate
========================

A Symfony Console CLI tool to restore filesystem timestamps for Google Takeout media from JSON metadata.

0.1.1(5mo ago)00MITPHPPHP ^8.4CI passing

Since Nov 13Pushed 5mo agoCompare

[ Source](https://github.com/dsuurlant/takeout-redate)[ Packagist](https://packagist.org/packages/dsuurlant/takeout-redate)[ RSS](/packages/dsuurlant-takeout-redate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (3)Used By (0)

Takeout Redate CLI
==================

[](#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
------------

[](#requirements)

- PHP 8.4 or higher

Recommended Usage with Google Photos Takeout
--------------------------------------------

[](#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

[](#overview)

The process involves three main steps:

1. **Obtain and extract** your Google Photos Takeout archive
2. **Consolidate** all files into a single directory structure
3. **Restore dates** using this tool

### Step 1: Obtain Your Archive

[](#step-1-obtain-your-archive)

1. Request your Google Photos archive from Google Takeout
2. Download all ZIP files before they expire (archives have expiration dates)
3. 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

[](#step-2-extract-and-consolidate)

1. Extract all ZIP files from your download
2. Consolidate the extracted directories.

    **On macOS**: If files are split into multiple "Takeout 1", "Takeout 2", etc. directories, use this script to merge them:

```
#!/bin/bash
for src in Takeout\ [0-9]*; do
  [ -d "$src" ] || continue
  rsync -a --info=progress2 --ignore-existing --remove-source-files "$src"/ "Takeout"/ && find "$src" -type d -empty -delete
done
```

**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

[](#step-3-restore-dates)

Google exports photos organized by year:

```
./Photos from 2018/
./Photos from 2019/
./Photos from 2020/
./Photos from 2021/
...

```

**Recommended approach**: Process one year at a time to avoid timeouts with large archives.

For each year directory:

1. **Set your base directory** (optional, for convenience):

```
export TAKEOUT_DIR="/mystorage/takeout/photos/"
```

2. **Test with dry-run** first:

```
php takeout-redate.phar --path="$TAKEOUT_DIR/Photos from 2018" --dry-run
```

3. **If no errors, run for real** and optionally delete metadata files after processing:

```
php takeout-redate.phar --path="$TAKEOUT_DIR/Photos from 2018" --delete
```

4. **Repeat for each year** directory in your archive

Happy archiving and good luck moving away from Google!

Installation
------------

[](#installation)

### As PHAR

[](#as-phar)

Download the compiled PHAR file and make it executable:

```
chmod +x takeout-redate.phar
mv takeout-redate.phar /usr/local/bin/takeout-redate
```

Or use it directly:

```
php takeout-redate.phar
```

Usage
-----

[](#usage)

```
# Run the application
php bin/app

# Or after building the PHAR
./takeout-redate.phar
```

Development
-----------

[](#development)

```
# Install dependencies
composer install

# Run tests
composer test

# Build PHAR file
composer build

# Test build locally (runs tests, builds PHAR, and verifies it works)
composer test-build

# Code quality checks
composer quality
```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance70

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

178d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8d44a4952bb78f2f62ab22421d78b305f89a021282d924268ec8fc4d5772b99?d=identicon)[dsuurlant](/maintainers/dsuurlant)

---

Top Contributors

[![dsuurlant](https://avatars.githubusercontent.com/u/4609379?v=4)](https://github.com/dsuurlant "dsuurlant (32 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dsuurlant-takeout-redate/health.svg)

```
[![Health](https://phpackages.com/badges/dsuurlant-takeout-redate/health.svg)](https://phpackages.com/packages/dsuurlant-takeout-redate)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[civicrm/cv

CLI tool for CiviCRM

4219.8k](/packages/civicrm-cv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
