Automated Medium post backup to Markdown for Windows using Docker Desktop (Hyper-V), powered by ZMediumToMarkdown.
flowchart TD
Build[Build-ZMediumDocker.ps1\n--Username] --> Image[Docker image built\nZMediumToMarkdown]
Image --> Backup[Medium-Backup.ps1]
Backup --> Firefox[Auto-extract cookies\nfrom Firefox\ncached with DPAPI]
Firefox --> Docker{Docker Desktop\nrunning?}
Docker -->|❌ Not running| Start[Auto-start Docker\nwait for engine]
Start --> Run
Docker -->|✅ Running| Run[Run container\nfetch all posts]
Run --> MD[Markdown files\n+ images saved to Output/]
MD --> Restructure[Restructure into\nper-article folders\nfix asset paths]
Restructure --> OutDir[Output/ next to script]
OutDir --> Toast[Windows toast\nnotification]
Toast --> Log[Write to log file\n30-day rotation]
Log --> Done([✅ Backup complete])
Sched[Register-Task.ps1\noptional daily trigger] -.->|triggers| Backup
style Docker fill:#7a5500,color:#fff
style Done fill:#2d6a2d,color:#fff
style Start fill:#7a5500,color:#fff
- ✅ No WSL2 required (pure Hyper-V)
- ✅ Handles paywall posts (with cookies)
- ✅ Modern Windows notifications
- ✅ Task Scheduler automation ready
- Windows 10/11 Pro/Enterprise/Education
- Docker Desktop installed
- Hyper-V enabled
- Firefox (signed into Medium)
- PowerShell 5.1+
1. Sign into Medium on Firefox:
- Install Firefox if you haven't already
- Open Medium.com in Firefox and sign in
- Cookies are read automatically — no manual steps needed
2. Build Docker Image:
.\Build-ZMediumDocker.ps1 -Username "yourname"3. Run Backup:
.\Medium-Backup.ps1 -VerboseSample run:
VERBOSE: Checking Docker Desktop status...
VERBOSE: Docker Desktop is running.
VERBOSE: Output location: C:\Users\yourname\windows-medium-backup\Output
VERBOSE: Starting ZMediumToMarkdown container for user: yourname
VERBOSE: Downloading posts...
[1/12] the-hidden-registry-key-that-blocks-windows-hello.md ✓
[2/12] automating-medium-backup-on-windows.md ✓
[3/12] why-your-printer-address-book-wont-import.md ✓
...
[12/12] getting-started-with-pester-5.md ✓
VERBOSE: Restructuring 12 articles into per-article folders...
VERBOSE: Writing log: Medium-Backup-20260506.log
VERBOSE: Sending toast notification...
✅ Backup completed successfully!
📁 Location: C:\Users\yourname\windows-medium-backup\Output
📊 Articles: 12 (each in its own folder)
📝 Log: Medium-Backup-20260506.log
Done! Posts saved to Output\ next to the script.
- SETUP.md - Detailed setup instructions
- TROUBLESHOOTING.md - Common issues and solutions
- TASK-SCHEDULER.md - Automated daily backups via
Register-Task.ps1
Output\
├── 2024-07-10-remove-sensitive-data-1ad65c2593f7\
│ ├── 2024-07-10-remove-sensitive-data-1ad65c2593f7.md
│ └── assets\
│ └── image.png
└── 2025-12-20-google-ai-product-chaos-e35dc04a7a4d\
├── 2025-12-20-google-ai-product-chaos-e35dc04a7a4d.md
└── assets\
└── image.jpg
Each article gets its own folder. Assets are co-located and image paths in the Markdown are rewritten automatically.
- Automatic credential extraction - Reads Medium cookies from Firefox; DPAPI-cached locally
- Automatic Docker management - Starts Docker if not running
- Portable output - Saves next to the script; works inside OneDrive-synced folders too
- Toast notifications - Visual feedback when backup completes
- Automatic logging - 30-day log rotation
- Error recovery - Detailed error messages and troubleshooting
- Windows 10/11 Pro, Enterprise, or Education
- Home editions: Hyper-V not available (WSL2 support planned)
- Docker Desktop 4.0+ with Hyper-V backend
- Firefox (signed into Medium) — for automatic cookie extraction
- PowerShell 5.1+ (included in Windows)
Medium cookies are extracted automatically from Firefox and cached locally (DPAPI-encrypted). When they expire, the next backup run re-extracts from Firefox automatically — as long as you are still signed into Medium on Firefox. No manual intervention required.
See TROUBLESHOOTING.md for details.
- ZMediumToMarkdown by ZhgChgLi - Core conversion tool
- BurntToast by Windos - Windows 10 toast notifications
MIT License - See LICENSE file for details
This is a simple utility project. Issues and pull requests welcome, but keeping scope minimal.