Laravel-Based Backup Application.
Drive Backup is a backup application intended for VPS or Cloud. A small size and light weight makes Drive Backup a good platform to be hosted even in a small computer such as Raspberry Pi effectively. Built on Laravel 8.75, Drive Backup is easy to install and run even if your hardware is more limited.
- This backup package requires PHP 8.0, with the ZIP module and Laravel 9.0 or higher. It's not compatible with Windows servers.
- If you are using an older version of Laravel, take a look at one of the previous versions of this package.
- The package needs free disk space where it can create backups. Ensure that you have at least as much free space as the total size of the files you want to backup.
- Make sure
mysqldump
is installed on your system if you want to backup MySQL databases. - Make sure
pg_dump
is installed on your system if you want to backup PostgreSQL databases. - Make sure
mongodump
is installed on your system if you want to backup Mongo databases.
git clone https://github.com/timoxoszt/drive-backup.git
cd drive-backup
cp .env.example .env
composer install
composer update
php artisan key:generate
Detailed information on how to obtain your API ID, secret and refresh token:
Add the keys you created to your .env
file and set google
as your default cloud storage. You can copy the .env.example
file and fill in the blanks.
FILESYSTEM_CLOUD=google
GOOGLE_DRIVE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=xxx
GOOGLE_DRIVE_REFRESH_TOKEN=xxx
GOOGLE_DRIVE_FOLDER_ID=null
#GOOGLE_DRIVE_TEAM_DRIVE_ID=xxx # uncomment if you use team drive
Setup email for notifications:
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=your-user
MAIL_PASSWORD=your-passwd
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your-address
MAIL_TO_ADDRESS=receive-notifications-address
You can backup your app by running:
php artisan backup:run
Backup without notifications:
php artisan backup:run --disable-notifications
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.