Compare commits
195 Commits
1.0.5-test
...
master
Author | SHA1 | Date |
---|---|---|
Fabian Schlenz | 94785357bc | |
Fabian Schlenz | 223a0fdde3 | |
Fabian Schlenz | bce5996643 | |
Fabian Schlenz | cf806da77d | |
Fabian Schlenz | c2b1c0625e | |
Fabian Schlenz | 3c68e6d814 | |
Fabian Schlenz | 7e2d49ef09 | |
Fabian Schlenz | 11a6318a26 | |
Fabian Schlenz | bb2a291d4f | |
Fabian Schlenz | b1e9346203 | |
Fabian Schlenz | 6b5b9a669b | |
Fabian Schlenz | 6b9cc9533a | |
Fabian Schlenz | 4c6c049502 | |
Fabian Schlenz | 28b402d3ab | |
Fabian Schlenz | 6d4701189b | |
Fabian Schlenz | c963a8f334 | |
Fabian Schlenz | 2402356013 | |
Fabian Schlenz | df1c90578b | |
Fabian Schlenz | 96d5b5c77b | |
Fabian Schlenz | c5f901f4a2 | |
Fabian Schlenz | e8c28b4e72 | |
Fabian Schlenz | f434482cdf | |
Fabian Schlenz | 4d45c7f1cc | |
Fabian Schlenz | 955ae42952 | |
Fabian Schlenz | 01590b05ee | |
Fabian Schlenz | b5ff4dd1a6 | |
Fabian Schlenz | b199dc335f | |
Fabian Schlenz | 1ff540977e | |
Fabian Schlenz | ff9163c1bb | |
Fabian Schlenz | 38fce0ee5c | |
Fabian Schlenz | f24e66271f | |
Fabian Schlenz | a9444e7813 | |
Fabian Schlenz | 069799cbaf | |
Fabian Schlenz | 9affb47130 | |
Fabian Schlenz | be1cf8ba91 | |
Fabian Schlenz | 5c466131d3 | |
Fabian Schlenz | e5da546386 | |
Fabian Schlenz | ec4097e777 | |
Fabian Schlenz | 77efde1136 | |
Fabian Schlenz | 253b334fc3 | |
Fabian Schlenz | ebff71b208 | |
Fabian Schlenz | eea08a5559 | |
Fabian Schlenz | 78031b0ff2 | |
Fabian Schlenz | f4d563226c | |
Fabian Schlenz | 968ee831f0 | |
Fabian Schlenz | 2d409352bc | |
Fabian Schlenz | 97cf26b46d | |
Fabian Schlenz | 6276651b84 | |
Fabian Schlenz | f8984b25b1 | |
Fabian Schlenz | 2295ced528 | |
Fabian Schlenz | aec609e6c4 | |
Fabian Schlenz | dd99612bed | |
Fabian Schlenz | 25a01fae4b | |
Fabian Schlenz | 077cbcebca | |
Fabian Schlenz | a8149dfce9 | |
Fabian Schlenz | ecb225ef60 | |
Fabian Schlenz | c79336618c | |
Fabian Schlenz | e75aa2101e | |
Fabian Schlenz | 19973818f8 | |
Fabian Schlenz | d796cb1bf0 | |
Fabian Schlenz | b0fa297a61 | |
Fabian Schlenz | a8944125b6 | |
Fabian Schlenz | d66834c3d5 | |
Fabian Schlenz | c99766a71e | |
Fabian Schlenz | 79b68bd93d | |
Fabian Schlenz | dcdc313c8b | |
Fabian Schlenz | ac85f06e3e | |
Fabian Schlenz | 65ae4f4a86 | |
Fabian Schlenz | 9f9d9fd183 | |
Fabian Schlenz | c29cd2a8ee | |
Fabian Schlenz | 68e5c9be2d | |
Fabian Schlenz | 9a9e4284d9 | |
Fabian Schlenz | 3c5a8e9d38 | |
Fabian Schlenz | 6c6725e711 | |
Fabian Schlenz | 834aaf0292 | |
Fabian Schlenz | 365e38970d | |
Fabian Schlenz | e40096fc44 | |
Fabian Schlenz | b65e624876 | |
Fabian Schlenz | 85c525ab1c | |
Fabian Schlenz | da2a7d88b6 | |
Fabian Schlenz | b959c35bea | |
Fabian Schlenz | 89cca39409 | |
Fabian Schlenz | 7fa89ab1b1 | |
Fabian Schlenz | 53fcd36e66 | |
Fabian Schlenz | 897435adf9 | |
Fabian Schlenz | 74dbc9d412 | |
Fabian Schlenz | 7b49153c93 | |
Fabian Schlenz | 07572c0618 | |
Fabian Schlenz | e3aaa58256 | |
Fabian Schlenz | 6592e15b09 | |
Fabian Schlenz | bc63cfaea1 | |
Fabian Schlenz | 9678aaaee8 | |
Fabian Schlenz | cee9fad0dd | |
Fabian Schlenz | 4e74b4c30b | |
Fabian Schlenz | 75786e39b4 | |
Fabian Schlenz | dae603a95e | |
Fabian Schlenz | eb1f731b9d | |
Fabian Schlenz | f5431e805e | |
Fabian Schlenz | 82d6255144 | |
Fabian Schlenz | 645d8cc315 | |
Fabian Schlenz | 14324dfa4c | |
Fabian Schlenz | d4a6141862 | |
Fabian Schlenz | 12cc65aa18 | |
Fabian Schlenz | 8ac5744405 | |
Fabian Schlenz | 2324c6e0c4 | |
Fabian Schlenz | 3920425d37 | |
Fabian Schlenz | 42dc500514 | |
Fabian Schlenz | de354f548d | |
Fabian Schlenz | bb48a2f601 | |
Fabian Schlenz | 3a77e91bd9 | |
Leijurv | 3ee90ac6c6 | |
Leijurv | a34ba8a84c | |
Leijurv | 3911af1f88 | |
Fabian Schlenz | 0e2eeab5b9 | |
Fabian Schlenz | ab16c44de5 | |
Jake Vossen | 52d90ffc43 | |
Fabian Schlenz | 004b650762 | |
Fabian Schlenz | 8f1a9d391c | |
Fabian Schlenz | 93ad47639f | |
Fabian Schlenz | 28931830eb | |
Fabian Schlenz | c83de2ed00 | |
Fabian Schlenz | ab6a30c48e | |
Fabian Schlenz | 9bee01698f | |
Fabian Schlenz | 6a7560cb98 | |
Fabian Schlenz | e1ad5c4e86 | |
Fabian Schlenz | bb180f95be | |
Fabian Schlenz | 7067f98943 | |
Fabian Schlenz | 9bc2ed7666 | |
Fabian Schlenz | f75a90936d | |
Fabian Schlenz | 9832d429b0 | |
Fabian Schlenz | 191b2fe05a | |
Fabian Schlenz | dd0986c449 | |
Fabian Schlenz | 2321fa11ee | |
Fabian Schlenz | 07bb29ea1c | |
Fabian Schlenz | 37a5716e50 | |
Fabian Schlenz | f847c372d1 | |
Fabian Schlenz | 992c456af5 | |
Fabian Schlenz | 584069a130 | |
Fabian Schlenz | 3a4508012a | |
Fabian Schlenz | deb5e316cb | |
Fabian Schlenz | 3309ae1338 | |
Fabian Schlenz | 166df82ac1 | |
Fabian Schlenz | 9693371a3d | |
Fabian Schlenz | 5328df65b3 | |
Fabian Schlenz | fff3483e63 | |
Fabian Schlenz | 99574c6e6e | |
Fabian Schlenz | b8d9e2a1b6 | |
Fabian Schlenz | 459de54ae7 | |
Fabian Schlenz | 7bf22f4692 | |
Robert Orzanna | 7dd0c044cd | |
Fabian Schlenz | 88eb7a412c | |
Hypfer | 0de09c45dc | |
Fabian Schlenz | 14d80a70fe | |
Fabian Schlenz | be56f21a0f | |
Fabian Schlenz | 1a72ab8735 | |
Fabian Schlenz | 6b44a6c569 | |
Fabian Schlenz | c945f05c3d | |
Fabian Schlenz | 6d772a3be1 | |
Fabian Schlenz | 42112d7607 | |
Fabian Schlenz | a2224b326d | |
Fabian Schlenz | c5921304ed | |
Fabian Schlenz | 92fb628b92 | |
Fabian Schlenz | 1d8724ecb7 | |
Fabian Schlenz | 50ba11a86c | |
Fabian Schlenz | 6738e20fe4 | |
Fabian Schlenz | e0668926c9 | |
Fabian Schlenz | d9667211a4 | |
Fabian Schlenz | a489036c2f | |
Fabian Schlenz | 2641b5ce7a | |
Fabian Schlenz | f87aef3599 | |
Fabian Schlenz | 715b86b09b | |
Fabian Schlenz | 0b6a771e19 | |
Fabian Schlenz | a8325735a3 | |
Fabian Schlenz | 114a20a71c | |
Fabian Schlenz | 23c6554ccb | |
Fabian Schlenz | bc84ff1fc1 | |
Fabian Schlenz | fb2db5b639 | |
Fabian Schlenz | e9df4ebdb4 | |
Fabian Schlenz | ec0c05fdb8 | |
Luckydonald | 2ac8c753bb | |
Luckydonald | 4e75d39a67 | |
Fabian Schlenz | e0afcc2063 | |
Fabian Schlenz | 4ef11a1953 | |
Fabian Schlenz | 4b92d63d2e | |
Fabian Schlenz | 0249374384 | |
Fabian Schlenz | 2dc3484f7d | |
Fabian Schlenz | 6a90f2ef5c | |
Fabian Schlenz | 3d213e9780 | |
Fabian Schlenz | e32924fc00 | |
Florian Keller | 94c1a413ee | |
Fabian Schlenz | f73a00f9cc | |
Fabian Schlenz | 9154a1bcc2 | |
Fabian Schlenz | 42da94d290 | |
Fabian Schlenz | 3a615f94af | |
Fabian Schlenz | cb36fb29a6 |
|
@ -9,3 +9,8 @@ data/
|
|||
src/main/main.iml
|
||||
cache4.*
|
||||
src/test/test.iml
|
||||
dev/
|
||||
todo
|
||||
deploy.secret.sh
|
||||
release_notes.txt
|
||||
out
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
language: java
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
|
@ -0,0 +1,12 @@
|
|||
# Deploying a new version
|
||||
|
||||
* Update the version in the Dockerfile to the coming version.
|
||||
* Commit the new Dockerfile.
|
||||
* Merge into stable: `git checkout stable && git merge --no-ff master`
|
||||
* Create a new tag for the new version: `git tag -a <version>`.
|
||||
* Push everything to github: `git push --all && git push --tags`.
|
||||
* Build it: `gradle build`.
|
||||
* Create a new release on github for this version. 'Release title' has to be just the version string. Attach the newly built `telegram-backup.jar`.
|
||||
* Build the docker image: `docker build -t fabianonline/telegram_backup:<version> -t fabianonline/telegram_backup:latest - < DOCKERFILE`.
|
||||
* Push the docker image: `docker push fabianonline/telegram_backup`.
|
||||
* Post a message into the telegram_backup users group.
|
|
@ -0,0 +1,15 @@
|
|||
FROM openjdk:8
|
||||
|
||||
ENV JAR_VERSION 1.1.3
|
||||
ENV JAR_DOWNLOAD_URL https://github.com/fabianonline/telegram_backup/releases/download/${JAR_VERSION}/telegram_backup.jar
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install --no-install-recommends -y curl && \
|
||||
curl -L "https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64" -o /bin/dumb-init && \
|
||||
curl -L $JAR_DOWNLOAD_URL -o telegram_backup.jar && mkdir /data/ && \
|
||||
chmod +x /bin/dumb-init && \
|
||||
apt-get remove -y curl && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT ["/bin/dumb-init", "--", "java", "-jar", "telegram_backup.jar", "--target", "/data/"]
|
48
README.md
48
README.md
|
@ -2,6 +2,16 @@
|
|||
Copyright 2016 Fabian Schlenz
|
||||
Licensed under GPLv3
|
||||
|
||||
## State of this project
|
||||
The 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).
|
||||
|
||||
At 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.
|
||||
|
||||
Fixing 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...
|
||||
|
||||
So long, and thanks for all the fish. ;-) \
|
||||
Fabian
|
||||
|
||||
## Description
|
||||
This is a small Java app that allows you to download all your history from
|
||||
Telegram's servers and keep a local copy of them.
|
||||
|
@ -18,16 +28,13 @@ You can find the whole app packed into one fat jar file under
|
|||
only.
|
||||
* Incremental backups - if you run the tool at a later time, it will only
|
||||
download new messages / media.
|
||||
* You will be able to use an HTML exporter to create static HTML files
|
||||
containing your chats. This feature is still in the works.
|
||||
|
||||
## Limitations
|
||||
This tool relies on Telegram's API. Apparently they don't like people who
|
||||
download lots of media files, so this app gets blocked after about 2000
|
||||
downloaded media files. This is nothing bad; the app detects this and waits
|
||||
the necessary amount of time as dictated by Telegram. Since this delay can
|
||||
be quite large (I've seen 50 minutes), downloading lots and lots of media
|
||||
can take some time.
|
||||
This tool relies on Telegram's API. They started rate limiting the calls
|
||||
made by this tool some time ago. As of February 2017, downloading messages
|
||||
is limited to 400 messages every 30 seconds, resulting in 48,000 messages
|
||||
per hour. Media download is not throttled right now, so it should be a lot
|
||||
quicker.
|
||||
|
||||
But since this tool is designed to be able to continue it's work at any
|
||||
time, you can just abort the download and continue it later - that way,
|
||||
|
@ -44,6 +51,15 @@ Basically, you have to call it with `--login` first to login to your telegram ac
|
|||
call it again with `--account <phone>` to use this account and download all
|
||||
it's history. If you have just one account, you can omit this parameter.
|
||||
|
||||
Use `--with-supergroups` and / or `--with-channels` to also download all
|
||||
messages from the supergroups / channels you have joined that have been
|
||||
active in the last time.
|
||||
|
||||
After making a backup, call it again with `--export html` to create a few
|
||||
more-or-less nice to look at HTML files containing all your chats. They will
|
||||
be created in the subfolder `files` of your backup. You can just open the
|
||||
file index.html in your browser to look at the files.
|
||||
|
||||
## Donations
|
||||
I've put quite some time into this tool. If you want to donate a small
|
||||
amount, you can send it via Bitcoin to *1CofYzS88iEngxMu4NqQeohWDBUHv9CNDJ* or via PayPal to
|
||||
|
@ -55,6 +71,11 @@ link](https://www.amazon.de/ref=as_li_ss_tl?ie=UTF8&linkCode=ll2&tag=telegrambac
|
|||
pay any more, but I will get a few percent of your purchase's worth from
|
||||
amazon.
|
||||
|
||||
## Contact
|
||||
If you have questions or comments or need help, you can join the
|
||||
[telegram_backup Development group](https://t.me/joinchat/CXFirQenTSeGWhxnikd8tg)
|
||||
at Telegram.
|
||||
|
||||
## Frequently asked questions
|
||||
### Why do I see error messages?
|
||||
The library I'm using to access Telegram has some small bugs. One of those
|
||||
|
@ -74,7 +95,7 @@ this will be detected at the next run of this program and then tried again.
|
|||
The files are being saved in your User directory in a folder named
|
||||
`telegram_backup`. Under windows, this would typically be under
|
||||
`C:\Users\<username>\telegram_backup`. Linux users should look unter
|
||||
`/home/<username>/telegram_backup`.
|
||||
`/home/<username>/.telegram_backup`.
|
||||
|
||||
You can change this directory by supplying `--target <dir>` when calling
|
||||
Telegram_Backup.
|
||||
|
@ -90,6 +111,15 @@ containing all your messages and other data. The folder `files` contains all
|
|||
media files, named after the ID of the message they belong to. Last but not
|
||||
least the folder `export` contains exported data.
|
||||
|
||||
### What are EmptyMessages? Why are there so many messages?
|
||||
If you are a member of a normal group (non-supergroup), all messages sent to
|
||||
that group are being copied to your personal messages at Telegram's servers.
|
||||
|
||||
If you later leave this group, those messages are being deleted at Telegram,
|
||||
but since all messages are continuously numbered, you can't simply delete
|
||||
them because that would leave a hole in your message numbers. So these
|
||||
messages are instead replaced by EmptyMessages - those things contain zero
|
||||
information, they are just saying "here was a message but it was deleted".
|
||||
|
||||
## Attribution
|
||||
This tool uses libraries from other developers which are covered by other licenses,
|
||||
|
|
36
build.gradle
36
build.gradle
|
@ -1,24 +1,46 @@
|
|||
apply plugin: 'java'
|
||||
apply plugin: 'application'
|
||||
|
||||
mainClassName= 'de.fabianonline.telegram_backup.CommandLineRunner'
|
||||
mainClassName= 'de.fabianonline.telegram_backup.CommandLineRunnerKt'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://jitpack.io"
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.apiVersion = "1.0"
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
compile('com.github.badoualy:kotlogram:497e5dd62d9bcb341f584164b04b4b537ce9d295') {
|
||||
compile('com.github.badoualy:kotlogram:666a81ef9d6707f117a3fecc2d21c91d51c7d075') {
|
||||
exclude module: 'slf4j-simple'
|
||||
}
|
||||
compile 'org.xerial:sqlite-jdbc:3.8.11.2'
|
||||
compile 'com.github.spullara.mustache.java:compiler:0.8.18'
|
||||
compile 'org.xerial:sqlite-jdbc:3.16.1'
|
||||
compile 'com.github.spullara.mustache.java:compiler:0.9.5'
|
||||
compile 'org.slf4j:slf4j-api:1.7.21'
|
||||
compile 'ch.qos.logback:logback-classic:1.1.7'
|
||||
compile 'com.google.code.gson:gson:2.5'
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
||||
compile 'com.github.kittinunf.fuel:fuel:1.12.0'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
@ -33,7 +55,9 @@ def getVersionName= { ->
|
|||
commandLine 'git', 'describe', '--tags', '--dirty'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
def version = stdout.toString().trim()
|
||||
logger.lifecycle("Version $version")
|
||||
return version
|
||||
}
|
||||
|
||||
ant.propertyfile(file: "$project.rootDir/build/resources/main/build.properties") {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue