a laravel project used to backup database and files.
for now by using the terminal write
php artisan backup:run
Note:
if you don't configure your database properly it will not work. so first make sure
that your database configuration is all setup.
open using the browser
php artisan serve
the backup_panel is found on the route /home
first make application by going to https://console.developers.google.com/
setup Google API
and from OAuth credentials get a json
file copy it into .env
as following
update your .env
file
GOOGLE_DRIVE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=xxx
GOOGLE_DRIVE_REFRESH_TOKEN=xxx
GOOGLE_DRIVE_FOLDER_ID=null
configure the database, create a database called backup_user
DB_DATABASE=backup_user
DB_USERNAME=root
go to app/providers/LaravelBackupPanelServiceProviders
and add user email in gate()
function
in app/console/kernel.php
add the following or uncomment
$schedule->command('backup:clean')->dailyAt('01:30');
$schedule->command('backup:run --only-db')->dailyAt('01:35');