TelegramBackup
Python script that archives chats, channels and groups to SQLite with media, reactions and replies, and renders them as browsable HTML.
Python CLI · Open source · Data capturing · github.com
- Takes
- Username · URL
- Pricing
- Free, open source
- Footprint
- Passive · no contact with target
- Account
- Needed for full results
- API
- No public API
- Last verified
- Dec 3, 2026
Python script that archives chats, channels and groups to SQLite with media, reactions and replies, and renders them as browsable HTML. It takes username and URL. Read the cons before you build a workflow on it.
What it does
TelegramBackup logs in with your account through Telethon, lists every chat, channel and group it can see along with your contacts (both saved to CSV), and backs up the ones you pick. Messages, buttons, replies and reactions go into a SQLite database, media into a folder per chat, and an HTML page shows the result grouped by date, with reply previews, forwarded-from sources and inline media playback.
The database can be queried directly, and later runs add only messages newer than the last backup, which makes it practical for keeping a structured, searchable copy of channels under investigation. The author frames it for personal backups and asks that it be used only on data you are allowed to process.
Footprint is passive: it reads its own index or third-party records and does not contact the target. An account is needed for full results. There is no public API.
- +Structured database suited to custom queries
- +Keeps forwarded-from information and reactions
- +Handles Telegram flood limits
- −Needs a Telegram api_id and api_hash edited into the script and a logged-in account (use a research account)
- −Interactive menu only, no command-line flags
- −Last code change in April 2025
When to use it
- 01Use it when you want a channel's history as a SQLite database you can query alongside an HTML copy.
- 02Use it when you need to keep forwarded-from sources and reactions with each archived message.
Next steps from this result
Suggested from the inputs TelegramBackup takes- Found a resultConfirm it with a second, independent source before you record itPassive
- Found a new identifierPivot on it only if your scope covers the new targetDepends
Quick start
git clone https://github.com/N4rr34n6/TelegramBackup.git cd TelegramBackup pip install -r requirements.txt python telegram_backup.py
Technical details
Listing verified by an editor on Dec 3, 2026- API
- No public API
- Account
- Needed for full results
- Footprint
- Passive · no contact with target
- Pricing
- Free, open source
- Platforms
- Python CLI
- Repository
- N4rr34n6/TelegramBackup 71 stars
- Language
- HTML
- Licence
- AGPL-3.0
- Last commit
- Apr 2025 (dormant)
- Listed
- Dec 3
Reviews
No reviews yet
Written by signed-in members. Each review appears here after an editor has read it.
Used TelegramBackup? Sign in to say what you used it for and how it went.
Sign in to reviewDiscussion
Tips, questions and updates about TelegramBackup from the community.
No posts about TelegramBackup yet. Ask a question or share how you use it.
Alternatives to TelegramBackup
Listed tools that take the same inputs, closest match first.
- tdlOpen source · Passive · accountWhat it does
Go command-line toolkit that downloads files from Telegram chats, including protected ones, and exports messages and members to JSON.
URLUsernameNo ratings yetVerified yesterday - Telegram Media DownloaderOpen source · Passive · accountWhat it does
Python script that downloads every photo, video, voice note and document from chats or channels you belong to, picking up where it stopped.
UsernameURLNo ratings yetVerified yesterday - tg-archiveOpen source · Passive · accountWhat it does
Syncs a Telegram group's messages and media into SQLite and builds a static, browsable website archive of the chat.
UsernameURLNo ratings yetVerified yesterday