Skip to content

akshay-k-a-dev/telegram-to-gdrive-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Telegram β†’ Google Drive Pipeline

Backup your Telegram files automatically, like a boss.


πŸ€” Why I Made This

I used Telegram as my personal cloud for years β€” stuffed it with images, music, memes, GIFs… and suddenly: πŸ“ˆ 3,000+ files and counting.

At that point, finding anything in Telegram was like:

search β†’ scroll β†’ scroll β†’ scroll β†’ rage quit

So I decided to rescue my files and move them to Google Drive, where they can actually be searched, sorted, and found in seconds.

This script: βœ… Downloads your Telegram images, music, GIFs (skips text & MP4s) βœ… Uploads them straight to Google Drive βœ… Can resume where it left off if your internet dies πŸ’€ βœ… Lets you skip a file mid-download/upload if you don’t want it βœ… Can do parallel downloads & uploads so it’s not slooooow βœ… Saves your sanity 🧠✨


πŸ›  Features

  • Auto-resume β†’ restarts from last successful upload
  • Skip command β†’ type s during download/upload to skip the current file
  • Retry logic β†’ failed files will retry up to 3 times before being skipped
  • Timeout handling β†’ skips files that don’t start downloading after 10 min
  • Selective backup β†’ only grabs images, music, GIFs (no MP4s, no random text files)
  • Parallel transfers β†’ downloads & uploads multiple files at once for speed

πŸ“¦ Requirements

  • Python 3.8+
  • A Telegram API key β†’ Get it here
  • A Google Drive API client secret β†’ Follow this guide
  • Internet that doesn’t cry halfway through πŸ˜…

βš™οΈ Installation

# Clone the repo
git clone https://github.com/akshay-k-a-dev/telegram-to-gdrive-pipeline.git
cd telegram-to-gdrive-pipeline

# Install dependencies
pip install -r requirements.txt

πŸ”‘ Configuration

1️⃣ Put your Telegram API ID & API Hash in the config section of the script. 2️⃣ Download your Google Drive client_secrets.json and save it somewhere safe. 3️⃣ Update the script with your Google Drive folder ID.


πŸš€ Usage

python backup.py
  • Script will ask you to log into Telegram on first run.
  • It will also open a browser window for Google Drive authentication.
  • Sit back, relax, and let it work. β˜•

πŸ’‘ While it’s running:

  • Type s β†’ skip the current file and move to the next one.

πŸ“œ Logs

  • uploaded_files.log β†’ Keeps track of files already uploaded.
  • failed_downloads.log β†’ Files that failed after retries.

🎯 Roadmap

  • Add support for MP4 video backup (optional)
  • Add filtering by file size
  • Make it run as a scheduled background service

πŸ’¬ Final Words

This project started as a "I’ll just move a few files" thing… And turned into a "Holy crap my Telegram is a warehouse" mission.

Now my files live happily in Google Drive, and I don’t have to scroll endlessly anymore.

🐒 + ⚑ = ❀️

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages