-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partial backup #3
Comments
I did think about this, although I never thought of it as a high priority feature. But it is also clear that a naive "throw everything away and start over" approach won't work forever; my groups are growing rather large for this backup strategy as well. I have some ideas for implementing an incremental backup, but right now I don't have a lot of spare time to work on it. I will keep this issue open and post something if I make some kind of progress. |
I agree this would be very helpful. Thanks for the program! |
After thinking about it for a while I decided on the following approach for incremental backups:
This feature is now available for beta testing. Either download the v2.0.0 beta1 release or do a fresh clone and As an unrelated change in v2.0.0, the JSON5 configuration has been replaced with a YAML configuration, so please create a new configuration file based on |
Thanks man! |
@tvdstaaij Dang, I just dumped my history, took 40 minutes, and now I read about the beta version with this feature! Oh well, I'm really glad this feature exists now, thanks for doing this :) |
@lgommans Glad you find it useful, if you decide to switch to the beta I'd appreciate feedback on how it's working for you. Cheers! I'm planning on releasing 2.0.0 in February or March, but before that I'd like to get some more confidence that everything is working as expected. |
@tvdstaaij I tried the dev version and enabled all downloading options this time. Took over six hours, downloading over 2GB of files (and Telegram stores all this for free, wow, I never realized!). Running it again the next day worked fine. It did go past every chat individually, I don't know much about the Telegram API but I feel that could be done faster. Upon starting Telegram Desktop, it displays a list of chats (dialogs) with the last message pretty much instantly. No loading of individual last messages. This should probably be applied when checking whether there was an update, since most dialogs (about 80% for me) aren't regularly used and aren't likely to have a new message. Other than the delay in fetching the dialogs without new messages, it seems to work great. I didn't test cases like renamed chats etc., just a chat with some new messages. (I used the json dumper.) |
@lgommans Thanks for testing. I'll explain a bit about your observation that all dialogs are checked. First, I'd like to note that this script doesn't directly use the Telegram API, it only utilizes the command line interface offered by telegram-cli. One of my design decisions was to keep the script completely independent of internal telegram-cli state, because I believe this to be the least error prone (and I'm not even sure if there is a way to access internal telegram-cli state). This is achieved by only using the Now the fetching could be done much faster in theory, but it's rate limited by default to one chunk per second ( To summarize, Telegram Desktop and co can do it quickly because they use the API directly and keep internal state, which is much more advanced than this script does. |
Released v2.0.0 which includes this feature. |
Hi and thanks for your script.
I want to backup my chats every day; but in this way it takes a lot of times, because I'm member of many groups.
can you add some ability to your script to backup only changes?
The text was updated successfully, but these errors were encountered: