flamix/laravel-backup

Backup to telegram

Maintainers

Package info

github.com/rshkabko/laravel-backup

pkg:composer/flamix/laravel-backup

Statistics

Installs: 1 034

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-06-18 13:47 UTC

This package is auto-updated.

Last update: 2026-06-18 13:54:00 UTC


README

Free database backups for "pet projects": dumps the MariaDB/MySQL database, zips it, and delivers it to your Telegram account — convenient and cost-free.

Install

// Config
php artisan vendor:publish --provider="Flamix\LaravelBackup\LaravelBackupProvider" --tag="config"

// Add to scheduler: routes/console.php (or App\Console\Kernel)
Schedule::command('backup:database')->dailyAt('01:07')->runInBackground();

Run manually

php artisan backup:database

Config / .env

BACKUP_ENABLED=true
BACKUP_TELEGRAM_ENABLED=true
BACKUP_TELEGRAM_BOT_TOKEN=...
BACKUP_TELEGRAM_CHAT_ID=...
BACKUP_TELEGRAM_CHUNK_SIZE=47185920   # optional, default 45 MB

Ignore tables (data is skipped, structure is kept) via config/backup.php:

'database' => ['ignore' => ['activity_log', 'cache']], // no table prefix

Large backups (> 50 MB)

Telegram Bot API limits sendDocument to 50 MB. When the zip is bigger it is split into chunks of backup.telegram.chunk_size bytes (45 MB by default) and sent as separate documents named <zip>.001, <zip>.002, … Each part is captioned part k/N, followed by a restore note.

Restore from parts:

cat your_backup.zip.0* > backup.zip && unzip backup.zip