PHPackages                             larament/laravel-backup-telegram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. larament/laravel-backup-telegram

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

larament/laravel-backup-telegram
================================

Send your Laravel backup files to a Telegram chat or channel.

v2.0.0(3mo ago)644MITPHPPHP ^8.2CI failing

Since May 29Pushed 2mo agoCompare

[ Source](https://github.com/iRaziul/laravel-backup-telegram)[ Packagist](https://packagist.org/packages/larament/laravel-backup-telegram)[ Docs](https://github.com/iraziul/laravel-backup-telegram)[ GitHub Sponsors](https://github.com/iRaziul)[ RSS](/packages/larament-laravel-backup-telegram/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Laravel Backup Telegram
=======================

[](#laravel-backup-telegram)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4b1dfe6c9770e72de7378f9b2fa9128ebd90a4e7986a015bbfe7930d0c63228e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616d656e742f6c61726176656c2d6261636b75702d74656c656772616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/larament/laravel-backup-telegram)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6f95538c5e225e5f60739b2431c13a40d305345d06e5b1132803c8da4cf41492/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172616d656e742f6c61726176656c2d6261636b75702d74656c656772616d2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/larament/laravel-backup-telegram/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9826f712c129be1e4e6abeb6fb05b22ca730e7099a253e66d0d373ee23d4ffb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172616d656e742f6c61726176656c2d6261636b75702d74656c656772616d2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/larament/laravel-backup-telegram/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/065befbff00bd57e1a0c7b4e9bb85514442fd9a5a13f77e649b0cbc0807aba58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616d656e742f6c61726176656c2d6261636b75702d74656c656772616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/larament/laravel-backup-telegram)

Easily send your Laravel application's backup files directly to a Telegram chat or channel after each successful backup. This package integrates with [spatie/laravel-backup](https://github.com/spatie/laravel-backup) to automate backup delivery and supports large file splitting for Telegram's file size limits.

---

Features
--------

[](#features)

- Automatically sends backup files to Telegram after each successful backup.
- Supports sending to both private chats and channels.
- Handles large backup files by splitting them into Telegram-compatible chunks.
- Simple configuration and seamless integration with Laravel's backup events.

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- [spatie/laravel-backup](https://github.com/spatie/laravel-backup) v9.3+
- A Telegram bot and a chat/channel to receive backups

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require larament/laravel-backup-telegram
```

Publish the config file (recommended):

```
php artisan vendor:publish --tag="backup-telegram-config"
```

---

Telegram Setup
--------------

[](#telegram-setup)

1. **Create a Telegram Bot:**
    - Talk to [@BotFather](https://t.me/BotFather) on Telegram and create a new bot. Copy the API token.
2. **Add Bot to Your Chat or Channel:**
    - For a private chat, start a conversation with your bot.
    - For a channel, add your bot as an administrator.
3. **Get the Chat ID:**
    - Use [@userinfobot](https://t.me/userinfobot) or [getIDs bot](https://t.me/getidsbot) to find your chat or channel ID.

---

Configuration
-------------

[](#configuration)

Update your `.env` file or the published `config/backup-telegram.php`:

```
BACKUP_TELEGRAM_BOT_TOKEN=your_bot_token
BACKUP_TELEGRAM_CHAT_ID=your_chat_id
BACKUP_TELEGRAM_CHUNK_SIZE=40 # (optional, in MB, default: 40, max: 49)
```

Or in `config/backup-telegram.php`:

```
return [
    'token' => env('BACKUP_TELEGRAM_BOT_TOKEN'),
    'chat_id' => env('BACKUP_TELEGRAM_CHAT_ID'),
    'chunk_size' => env('BACKUP_TELEGRAM_CHUNK_SIZE', 40), // in megabytes (max 49 MB)
];
```

---

How it Works
------------

[](#how-it-works)

- On every successful backup (`spatie/laravel-backup` event), the package will automatically send the backup file to your configured Telegram chat/channel.
- If the file is larger than the Telegram limit (default 40MB), it will be split and sent in parts.

---

Usage
-----

[](#usage)

No manual usage is required! Once installed and configured, the package listens for backup events and sends the files automatically.

If you want to trigger a backup manually:

```
php artisan backup:run
```

---

Advanced: Handling Large Files
------------------------------

[](#advanced-handling-large-files)

- By default, files larger than 40MB are split into chunks and sent as multiple messages.
- You can adjust the chunk size in your config, but it cannot exceed 49MB due to Telegram's limitations.

---

Testing
-------

[](#testing)

Run the test suite:

```
composer test
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

---

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

---

Credits
-------

[](#credits)

- [Raziul Islam](https://raziul.dev)
- [All Contributors](../../contributors)

---

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance84

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~252 days

Total

2

Last Release

96d ago

Major Versions

v1.0 → v2.0.02026-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/c371b774feadb3bfc182f9309ab6aeac6789b993ac63a213fe3aca070f95100d?d=identicon)[Raziul](/maintainers/Raziul)

---

Top Contributors

[![iRaziul](https://avatars.githubusercontent.com/u/51883557?v=4)](https://github.com/iRaziul "iRaziul (9 commits)")

---

Tags

backuplaravellaravel-backuplaravel-backup-telegramtelegramlaravellaravel-backuplaravel-backup-telegram

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/larament-laravel-backup-telegram/health.svg)

```
[![Health](https://phpackages.com/badges/larament-laravel-backup-telegram/health.svg)](https://phpackages.com/packages/larament-laravel-backup-telegram)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
