Automated Medium post backup to Markdown for Windows using Docker Desktop (Hyper-V), powered by ZMediumToMarkdown.
flowchart TD
Cookies[Get Medium cookies\nuid + sid from browser] --> Build
Build[Build-ZMediumDocker.ps1\n--Username --CookieUID --CookieSID] --> Image[Docker image built\nZMediumToMarkdown]
Image --> Backup[Medium-Backup.ps1]
Backup --> 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
- PowerShell 5.1+
1. Get Medium Cookies:
- Open Medium.com in browser (logged in)
- Press F12 → Application → Cookies → medium.com
- Copy
uidvalue - Copy
sidvalue
2. Build Docker Image:
.\Build-ZMediumDocker.ps1 -Username "yourname" -CookieUID "abc123" -CookieSID "def456"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 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
- PowerShell 5.1+ (included in Windows)
Medium cookies expire after 30-90 days. When backup fails with authentication error:
- Get fresh cookies (see above)
- Rebuild Docker image with new cookies
- Run backup again
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.