leolopez/backup

Creates a backup of the database.

1.1.8 2022-05-09 20:30 UTC

This package is auto-updated.

Last update: 2024-04-10 00:37:09 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