Skip to content

Misiker101/Backup-manager

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

Backup-panel

a laravel project used to backup database and files.

How to backup

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

How to customize

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

To determine who can access Laravel Backup Panel in non-local environments.

go to app/providers/LaravelBackupPanelServiceProviders and add user email in gate() function

For daily backup

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');