bangnokia / laravel-backup-telegram
Upload your backup file to telegram channel for spatie/laravel-backup
Installs: 1 223
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: 8.*
- illuminate/support: ^8|^9|^10
- spatie/laravel-backup: ^8.1
Requires (Dev)
- orchestra/testbench: ^7.5
README
This package requires spatie/laravel-backup to work, it supports for uploading the backup file to a telegram channel.
Because this package use Telegram API, the file size must be limited to 50MB. So if your database is big, this solution isn't for your business.
If the file size is bigger than 50MB, the package will split the file into multiple files, using the split
command.
Setup
Install this package
composer require bangnokia/laravel-backup-telegram
Edit your config/services.php
file, then add these lines. I tried to match config with the package Telegram notification channel
'telegram-bot-api' => [
'token' => env('TELEGRAM_BOT_TOKEN'),
'chat_id' => env('TELEGRAM_CHAT_ID')
]
Usage
This package automatically add a event listener when a backup created successfully. So you just simply run php artisan backup:run
, your backup file will be uploaded to Telegram channel.
*If you don't use the email notification, please publish the backup.php
config file and change mail.to
value to an empty string, refer to this issue Does not work in Laravel 9