Download the PHP package tobischulz/rsync-backup-server without Composer
On this page you can find all versions of the php package tobischulz/rsync-backup-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tobischulz/rsync-backup-server
More information about tobischulz/rsync-backup-server
Files in tobischulz/rsync-backup-server
Package rsync-backup-server
Short Description self-host rsync backup server for laravel
License MIT
Informations about the package rsync-backup-server
Rsync Backup Server
This package let you handle all of your off-site backups by your own laravel project on your own hosted server. Add your source to the database and dispatch a new backup job through the artisan command. Laravel queue system will handle all steps to backup your databases or files.
Installation
Pull this package in using composer:
Publish the package files:
Add a backup destination storage disk config/filesystems.php
, where to store all the backup files. Driver has to be local
.
Add backup dispatch schedule command to app\Console\Kernel.php
:
Set your queue system in your .env file:
This package should work with every laravel queue system. Currently i tested it only with database. Make sure your migrations has been run for database queue driver.
You can publish the queue migrations with this artisan command: php artisan queue:table
Usage
Creating your first source:
backup_hour
Set your hour when the backup should be scheduled every day. The schedule command in app\Console\Kernel.php
will read all source servers from database that backup_hour is equal to the current time and dispatch the new backup job.
ssh_private_key_path
You will need to add your ssh public key from your backup server to every source server you want to connect to and make backups from. In this configuration you will need to set the private key of the backup server, that will be used to connect to your source server. With this database path of your private key you will be able to use different keys for each source server.
type
There are two types of backups in this package. The default backup
will create a new folder every time a backup runs. This will increase the disk usage on every backup but this should be handeld by the cleanup
command later.
The second type is rsync
. This type will sync the source folder with the destination folder.
Manually dispatch Backup
You can manually dispatch a new backup job by using the artisan command php artisan backup:run mySource
where mySource is the source name in your database.
Schedule Backups
Backup jobs will be scheduled based on your backup_hour
configuration on your source servers. This is handeld by the added artisan schedule command php artisan backups:dispatch
in app\Console\Kernel.php
.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
This package is heavly inspired by the upcoming package spatie/laravel-backup-server made by Spatie.
License
The MIT License (MIT). Please see License File for more information.
All versions of rsync-backup-server with dependencies
illuminate/console Version ^6.0|^7.0|^8.0
illuminate/contracts Version ^6.0|^7.0|^8.0
illuminate/events Version ^6.0|^7.0|^8.0
illuminate/filesystem Version ^6.0|^7.0|^8.0
illuminate/notifications Version ^6.0|^7.0|^8.0
illuminate/support Version ^6.0|^7.0|^8.0
spatie/ssh Version ^1.4
symfony/process Version ^5.1