leolopez/backup

Creates a backup of the database.

Installs: 253

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

pkg:composer/leolopez/backup

1.1.8 2022-05-09 20:30 UTC

This package is auto-updated.

Last update: 2025-10-10 03:55:18 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Installation

Install the package by the following command,

composer require leolopez/backup

Register the Service Provider

Add the provider in config/app.php int providers section.

Leolopez\Backup\BackupServiceProvider::class

Add Facade

Add the Facade to your config/app.php into aliases section,

'Backup' => \Leolopez\Backup\Facades\Backup::class,

Publish the Assets

Run the following command to publish config file,

php artisan vendor:publish --provider="Leolopez\Backup\BackupServiceProvider"

Register your credentials

Add the credentials of your microsoft account into .env file.

TENANT_ID='-----' 
CLIENT_ID='-----'
CLIENT_SECRET='-----'
USERNAME='-----'
PASSWORD='-----'

Register the crontab

Run the task every day at 1am.

crontab -e

0 1 * * * /usr/bin/php /var/www/html/project/artisan backup:create