Telegram backup

The purpose of this VM is to automatically download all messages and media from my Telegram account and sync that to backup1.

Setup #

1. Install Java #


echo "deb xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp:// --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer

2. Install fabianonline/telegram_backup #

  • mkdir -p /root/tgbkp/output
  • Download the latest release JAR from to /root/tgbkp/telegram_backup.jar.
  • Run java -jar telegram_backup.jar --target /root/tgbkp/output to setup the account information.
  • Run java -jar telegram_backup.jar --target /root/tgbkp/output again and let it finish the initial download of all data.

3. Setup the cronjob #

  • Paste the following into root’s crontab (by running crontab -e):
    0 2,14 * * * /usr/bin/java -jar /root/tgbkp/telegram_backup.jar --target /root/tgbkp/output > /dev/null

References #