claude-history-backup
Backup Claude Code session history before automatic cleanup removes old sessions. As of December 2025, Claude Code removes sessions older than ~1 month.
Install
pip install claude-history-backup
# or
uv tool install claude-history-backup
Quick Start
claude-history sync # Create a backup archive
claude-history scheduler-install # Install daily scheduler (macOS)
claude-history status # Check status
How It Works
~/.claude/projects/ → sync → ~/claude_code_history/
├── backup_20251208_180825.zip
├── backup_20251210_100000.zip
└── ...
Each sync creates a new timestamped zip archive of all sessions. Archives accumulate - manage them manually when needed.
Commands
claude-history status # Show sync status
claude-history sync # Create new backup archive
claude-history list # List all archives
claude-history config # View/set backup location
claude-history logs # View scheduler log
# Scheduler (macOS launchd - runs missed jobs on wake)
claude-history scheduler-install
claude-history scheduler-status
claude-history scheduler-remove
Configuration
# View current config
claude-history config
# Change backup location
claude-history config --backup-root ~/Dropbox/claude-backups
Default: ~/claude_code_history
Config file: ~/.config/claude-history/config.json
Metadata
Release files for claude-history-backup 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_history_backup-0.3.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_history_backup-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / claude_history_backup-0.3.0.tar.gz
| Download URL | claude_history_backup-0.3.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22ba537b2115d24f0a1ebf229f48d4f2bf2f8285c12f3d38af9335f3b7f6ba1f
|
|
BLAKE2b-256 checksum How to use checksums |
950d5b46821b0a5a46b89bde454efedd08ec90d8429b49745db5e9ae8b3578ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / claude_history_backup-0.3.0-py3-none-any.whl
| Download URL | claude_history_backup-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb346e78d61911d0d2619c02c524f2c38f0297246407dd22fdca0381023b20c5
|
|
BLAKE2b-256 checksum How to use checksums |
3fd809d9790051aa755c370089f4032d23661a679678cad7128f10c471fde932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|