Program for scraping groups in Telegram
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
egonalbrecht 1ac4abcb08 Update 'Files and Settings/ID Saved Messages/politicamente_incorreto_grupo.txt' 2 months ago
Backup Monitoring Update 'Backup Monitoring/Progress Monitoring - 12-31-2021 at 18hr 00min 02sec.txt' 2 months ago
Files and Settings Update 'Files and Settings/ID Saved Messages/politicamente_incorreto_grupo.txt' 2 months ago

Telegram Group Backup

Author, ID Telegram 1670082376, 03-19-2021, owner of channel. Program based on Linux. On Windows you may need to specify the path to use the python3.exe program. Below is an example of how the execution of the program looks in this case.


This program make backup of Telegam groups. It forward messages and scrap groups. It is similar to, but focus in gropus. This program already comes on Linux and is very simple to use. In the video tutorial you have an example of using this porgram. In the following address has an explanation of how to use it: Telegram does not let you send media indefinitely, it simply break, but it just decreases the interval between regular backups to solve this. Scraping groups is very slow, unfortunately.

Manual about how to use the program for channel backup

1. Register at To use the program, you must first register at This site allows you to use Telegram remotely, without the need for an interface. You will receive a code on your cell phone on Telegram. During the registration process, enter anything in the name and title field, with at least 8 letters. Select "Desktop". Once registered you will get 2 codes called api_ip and api_hash. SAVE THIS 2 CODES, as you will need it. It is suggested that you save to Telegram even in 'Saved Messages'.

2. Group Backup: First you will put your api_id and api_hash data in the file with the name api_id and api_hash.txt in the Files and Settings folder. Just replace the ????????? by their api_id and api_hash numbers. After putting these two data to make remote access, go to the file Files and Settings/Backup channels.txt and put the username of the channel to backup and the backup channel, separated by comma. When you run the program for the first time, Telegram will ask you for personal data. You will receive a code on your Telegram on your cell phone, use it in the program. You will be asked for your Telegram password. Go to the Telegram settings and create one, if you haven't already. During the execution of the program you will be asked to install additional packages. Install it as the command pip3 install. Surely it had asked you to install the telethon package, as shown below.

pip3 install telethon

To run the program, use the command below.


To run the program regularly, which is very important, you must use the crontab program, as spoken above. The use of crontab is indispensable because the main purpose of the program is to make backups regularly. For example, to make backups of your channels every day at midnight, you must include a command similar to this

0 0 * * * cd /home/path_to_program_directory/ && python3

Which means it will run the program every day at night, at 0 minute of 0 hour (24 hours). If you want to run the backup every 6 hours, you must include this command

0 */6 * * * cd /home/path_to_program_directory/ && python3

which means that the backup will run at 0 minutes every 6 hours, or more specifically, the program will run at 0 minutes at 0, 6, 12 and 18 hours, that is, 4 times a day. To restart the backup, delete the ID files inside the Files and Settings/ID Saved Messages.