{"id":13494559,"url":"https://github.com/fabianonline/telegram_backup","last_synced_at":"2025-03-28T14:31:23.056Z","repository":{"id":141150310,"uuid":"62449291","full_name":"fabianonline/telegram_backup","owner":"fabianonline","description":"Java app to download all your telegram data.","archived":true,"fork":false,"pushed_at":"2020-04-27T16:32:39.000Z","size":17536,"stargazers_count":449,"open_issues_count":55,"forks_count":90,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-10-31T09:37:01.411Z","etag":null,"topics":["backup","cli","java","media","messages","telegram"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabianonline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-07-02T12:12:28.000Z","updated_at":"2024-10-19T10:01:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"61bf0d31-8f33-4630-88dc-6bd19f9df550","html_url":"https://github.com/fabianonline/telegram_backup","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianonline%2Ftelegram_backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianonline%2Ftelegram_backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianonline%2Ftelegram_backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianonline%2Ftelegram_backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabianonline","download_url":"https://codeload.github.com/fabianonline/telegram_backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246045947,"owners_count":20714875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","cli","java","media","messages","telegram"],"created_at":"2024-07-31T19:01:26.025Z","updated_at":"2025-03-28T14:31:22.544Z","avatar_url":"https://github.com/fabianonline.png","language":"Kotlin","funding_links":["https://paypal.me/fabianonline"],"categories":["Kotlin","cli"],"sub_categories":[],"readme":"# Telegram_Backup\nCopyright 2016 Fabian Schlenz  \nLicensed under GPLv3\n\n## State of this project\nThe tool is working, but not really as intended: Media files in most cases can't be downloaded, message downloads are hit with 30 second delays after every 200 messages. Some users reported getting banned by Telegram without reason after using this tool (with many users not getting banned at the same time, so this could theoretically just be a coincidence).\n\nAt the same time, the official Telegram client has an official way to download one's data, which is a) officially supported and b) much, much, much faster than this tool.\n\nFixing this tool to at least get it to work again as planned would require more or less a complete rewrite of this code. Since I'm quite happy with the possibilities given by the official clients and don't have enough free time to spare to continue developing this project, I've decided to officially archive this tool. This is not an easy step for me, because this was my most used project and quite a lot of people wrote me nice messages and thanked me. But just keeping the user's hopes up for an update without really being able to do something doesn't seem fair. So...\n\nSo long, and thanks for all the fish. ;-) \\\nFabian\n\n## Description\nThis is a small Java app that allows you to download all your history from\nTelegram's servers and keep a local copy of them.\n\n## Download\nYou can find the whole app packed into one fat jar file under\n[releases](https://github.com/fabianonline/telegram_backup/releases).\n\n## Features\n* You can use multiple accounts with this tool.\n* Messages are saved in a SQLite database; media (documents, photos, videos,\n  stickers, geolocations, audios) are downloaded and saved as files.\n* A GUI is planned for later; at the moment this is a command line tool\n  only.\n* Incremental backups - if you run the tool at a later time, it will only\n  download new messages / media.\n\n## Limitations\nThis tool relies on Telegram's API. They started rate limiting the calls\nmade by this tool some time ago. As of February 2017, downloading messages\nis limited to 400 messages every 30 seconds, resulting in 48,000 messages\nper hour. Media download is not throttled right now, so it should be a lot\nquicker.\n\nBut since this tool is designed to be able to continue it's work at any\ntime, you can just abort the download and continue it later - that way,\nyou'll be moving step by step towards a complete archive of your telegram\nmessages and media files.\n\n## Usage\nYou need to have at least Java 1.7 installed on your machine. Download the\njar file, and run it on the console like this: `java -jar telegram_backup.jar`.\n\nAppend `--help` to get a list of all available commands.\n\nBasically, you have to call it with `--login` first to login to your telegram account and then\ncall it again with `--account \u003cphone\u003e` to use this account and download all\nit's history. If you have just one account, you can omit this parameter.\n\nUse `--with-supergroups` and / or `--with-channels` to also download all\nmessages from the supergroups / channels you have joined that have been\nactive in the last time.\n\nAfter making a backup, call it again with `--export html` to create a few\nmore-or-less nice to look at HTML files containing all your chats. They will\nbe created in the subfolder `files` of your backup. You can just open the\nfile index.html in your browser to look at the files.\n\n## Donations\nI've put quite some time into this tool. If you want to donate a small\namount, you can send it via Bitcoin to *1CofYzS88iEngxMu4NqQeohWDBUHv9CNDJ* or via PayPal to\n[mail@fabianonline.de](https://paypal.me/fabianonline).\n\nAlternatively use [this link](http://www.amazon.com/?_encoding=UTF8\u0026camp=1638\u0026creative=6742\u0026linkCode=ur2\u0026site-redirect=de\u0026tag=telegrambackup-21) the next time you shop at\namazon.com or [this\nlink](https://www.amazon.de/ref=as_li_ss_tl?ie=UTF8\u0026linkCode=ll2\u0026tag=telegrambackup-21\u0026linkId=c54d9fe7c560128c6f018dd24e80d486) for amazon.de. You won't\npay any more, but I will get a few percent of your purchase's worth from\namazon.\n\n## Contact\nIf you have questions or comments or need help, you can join the\n[telegram_backup Development group](https://t.me/joinchat/CXFirQenTSeGWhxnikd8tg)\nat Telegram.\n\n## Frequently asked questions\n### Why do I see error messages?\nThe library I'm using to access Telegram has some small bugs. One of those\nis the display of meaningless (because they are being acted accordingly upon)\nerror messages. Those include:\n* `Exception in thread \"pool-x-thread-y\" java.lang.Error:\njava.nio.channels.ClosedChannelException`\n* Something containing `AUTH_ERROR`\nYou can just ignore these messages.\n\nBasically, if the tool is continuing to run after error messages are shown,\nyou can just ignore the messages.\nEither way, even if Telegram_Backup would \"miss\" some files or messages,\nthis will be detected at the next run of this program and then tried again.\n\n### Where do you save the files?\nThe files are being saved in your User directory in a folder named\n`telegram_backup`. Under windows, this would typically be under\n`C:\\Users\\\u003cusername\u003e\\telegram_backup`. Linux users should look unter\n`/home/\u003cusername\u003e/.telegram_backup`.\n\nYou can change this directory by supplying `--target \u003cdir\u003e` when calling\nTelegram_Backup.\n\n### What are those files and folders?\nIn the folder `telegram_backup` is one folder named `stickers`, which will\nhold all sticker images you've received. Then there is a folder for each\naccount, named after the phone number associated with that account.\n\nIn these folders you will find `auth.dat` and `dc.dat`, which contain\nauthentication data. There is `database.sqlite` which is a SQLite3 database\ncontaining all your messages and other data. The folder `files` contains all\nmedia files, named after the ID of the message they belong to. Last but not\nleast the folder `export` contains exported data.\n\n### What are EmptyMessages? Why are there so many messages?\nIf you are a member of a normal group (non-supergroup), all messages sent to\nthat group are being copied to your personal messages at Telegram's servers.\n\nIf you later leave this group, those messages are being deleted at Telegram,\nbut since all messages are continuously numbered, you can't simply delete\nthem because that would leave a hole in your message numbers. So these\nmessages are instead replaced by EmptyMessages - those things contain zero\ninformation, they are just saying \"here was a message but it was deleted\".\n\n## Attribution\nThis tool uses libraries from other developers which are covered by other licenses,\nwhich are:\n* [Kotlogram](https://github.com/badoualy/kotlogram) by Yannick Badoual, licensed\n  under MIT License.\n* [SQLite JDBC](https://bitbucket.org/xerial/sqlite-jdbc) by Taro L. Saito,\n  licensed under Apache License version 2.0.\n* [Mustache.java](https://github.com/spullara/mustache.java) by RightTime,\n  Inc., licensed under Apache License version 2.0.\n* [Logback](http://logback.qos.ch) by QOS.ch, licensed unter LGPL version 2.1.\n* [SLF4J](http://www.slf4j.org) by QOS.ch, licensed under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianonline%2Ftelegram_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabianonline%2Ftelegram_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianonline%2Ftelegram_backup/lists"}