You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1e88a18
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
4
4
## Overview
5
5
6
-
WhatsApp Media Archiver organises your WhatsApp media into a structured folder hierarchy using metadata from the WhatsApp database (`msgstore.db`). Instead of an unstructured dump, you get a browsable archive sorted by contact or group, year, and direction (Sent/Received), with original message timestamps preserved.
6
+
WhatsApp Media Archiver organises your WhatsApp media into a structured folder hierarchy using metadata from the WhatsApp database.
7
+
Instead of an unstructured dump, you get a browsable archive sorted by contact or group, year, and direction (Sent/Received), with original message timestamps preserved.
7
8
8
9
> ⚠️ **This tool is designed to run on a backup copy of your WhatsApp data — never on live device files.** For safeguard reasons, this script will always make a copy of your data.
9
10
@@ -21,8 +22,10 @@ WhatsApp Media Archiver organises your WhatsApp media into a structured folder h
21
22
- Duplicate media detection across runs — CSV report of files with identical content at multiple archive paths
22
23
- Missing media CSV report for manual recovery of old or deleted files
23
24
- Dry run mode for safe previewing before a full run
24
-
- iOS support — reads directly from an iPhone backup (`--ios_backup`); no third-party extraction tool required
25
-
- Encrypted backup support (`msgstore.db.crypt15`) via `wa-crypt-tools`
25
+
- Windows, Linux and MacOS are supported to run the script.
26
+
- WhatsApp platform: Android and iOS are both supported. No root or jailbreak are required.
27
+
- Android: requires a manual copy of your `/Whatsapp/Media/` folder
28
+
- iOS: reads directly from an iPhone backup, encrypted backups are supported via `wa-crypt-tools`
26
29
- Restore mode — reconstructs the original `WhatsApp/Media/` folder structure from the archive (Android only)
27
30
28
31
### Supported Media Types
@@ -122,7 +125,7 @@ The script is **safe to re-run** on an existing archive:
122
125
- Stickers are not archived in this version.
123
126
-**Year folders reflect the local time of the machine running the script**, not UTC. A message sent just after midnight on 1 January will be filed under the new year only if your machine's clock agrees. This is intentional — the archive reflects your local experience of when media was shared.
124
127
-**iOS restore mode is not supported.** Restore mode reconstructs the Android `Media/` folder layout, which has no equivalent on iOS. Running `--mode restore` on an iOS archive exits with a clear error.
125
-
-**iOS number change tracking is best-effort.** Contacts present in the device address book are consolidated automatically. Contacts not saved to the address book (`ZCONTACTABID = NULL`) appear as separate folders.
128
+
-**iOS number change tracking is best-effort.** Contacts present in the device address book are consolidated automatically. Contacts not saved to the address book appear as separate folders.
> 💡 Windows Users: your Python environment may not have pip in the PATH. If `pip install` doesn't work for you, `use py -m pip install`.
25
31
26
32
33
+
**Timezone feature for Windows**
34
+
35
+
If you plan to use the `--timezone` argument, Windows requires one additional package. macOS and Linux ship the IANA timezone database as part of the OS; Windows does not.
36
+
> ```
37
+
> pip install tzdata
38
+
> ```
39
+
> This is only needed when `--timezone` is used. Normal runs without `--timezone` work on Windows without it.
40
+
41
+
27
42
---
28
43
29
44
## 2. WhatsApp E2E Encrypted Backup
@@ -53,7 +68,7 @@ When asked, create the end-to-end ecrypted backup.
53
68
### Your WhatsApp Media Folder
54
69
55
70
Before you run the script, you need your WhatsApp (Media) folder on disk - actually, the folder called `WhatsApp` that **contains** the `Media` subfolder.
56
-
You need to copy this folder from your phone: you can use [Syncthing](https://syncthing.net/) to ease the process.
71
+
You need to copy this folder from your phone: you can use [Syncthing](https://syncthing.net/) to smooth the process.
|`--dry-run`| No | Simulate the run without copying any files |
38
39
|`--limit N`| No | Cap rows returned per chat type (N/2 from groups, N/2 from 1-to-1). Total rows ≤ N. Useful for test runs |
39
40
|`--since DATE`| No | Only include messages on or after this date (`YYYY-MM-DD`). Combines freely with `--limit`|
41
+
|`--timezone TZ`| No |[IANA timezone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for year folder assignment and report timestamps (e.g. `Europe/Rome`, `America/New_York`, `UTC`). Ensures files land in the correct `<YYYY>/` subfolder regardless of where or when the script is run. Also applied to `--since` date interpretation. Defaults to machine local time. **Windows users: requires `pip install tzdata`**|
Restore mode reconstructs the flat `WhatsApp/Media/` folder structure directly inside the archive folder, without needing the original device or database. This is useful when re-importing media into tools that expect the original WhatsApp layout.
175
177
176
-
> ⚠️ **Android archives only.** iOS media is stored at `Message/Media/...` paths that have no equivalent reconstruction target outside the iPhone backup format. Running restore mode on an iOS archive exits with a clear error.
178
+
> ⚠️ **Android archives only.** iOS media is stored at `Message/Media/...` paths that have no equivalent reconstruction target outside the iPhone backup format. Running restore mode on an iOS archive is disallowed.
177
179
178
180
The reconstructed tree is written to `<output>/Media/`, alongside the existing `Contacts/` and `Groups/` folders. No files are overwritten — identical files already in place are skipped silently.
0 commit comments