Package Data | |
---|---|
Maintainer Username: | bszalai |
Maintainer Contact: | szalai.b@gmail.com (Barna Szalai) |
Package Create Date: | 2014-04-16 |
Package Last Update: | 2016-10-25 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:03:08 |
Package Statistics | |
---|---|
Total Downloads: | 22 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
NOTE!
Please use this package for Laravel 5 and up: https://github.com/backup-manager/laravel
Dropbox upload is a Laravel 4 package, which uploads a previously dumped database file to a Dropbox account. The database backup is made by the package schickling/backup. Thanks Johannes!
The big advantage of this package is that it doesn't ask you to enter any input, because uses a permanent token key, your uploads will happen in the background..
Go to https://dropbox.com/developers/apps and generate api keys.
Install Dropboxupload
composer require bszalai/dropboxupload:dev-master
Create a file keys.json and fill it with your keys
{
"key" : "Dropbox app key",
"secret": "Dropbox app secret"
}
Copy this file into the Dropbox package's examples folder (vendor/dropbox/dropbox-sdk/examples).
Open a terminal, go to the above folder and enter
php authorize.php keys.json token.json
Click on the url in the terminal, it'll open a browser window, Allow the app to access your folder, and copy the provided key (you have to log in to Dropbox if you aren't logged in)
Go back to terminal, and paste the above key, and press Enter.
You'll have a token.json file created.
Copy this file into the app/storage folder. You are done.
Edit your app.php
in the app/config folder, and add the following lines to the service providers
Schickling\Backup\BackupServiceProvider
,
Bszalai\Dropboxupload\DropboxuploadServiceProvider
Publish the package config file
php artisan config:publish bszalai/dropboxupload
Edit the config file (app/config/packages/bszalai/dropboxupload/config.php), you have several options
prefix - name-prefix of the source file
uploadfolder - where to upload the file
compress - if set to true, it'll create a zip file
encrypt - encrypt the source file, set the encryption key so you can decrypt your file later
Create a CRON job for the Backup package
Example:
/usr/local/bin/php53 /path/to/your/app/artisan db:backup
Example:
/usr/local/bin/php53 /path/to/your/app/artisan dropbox:upload
Dropboxbackup is under MIT License
© 2014 Barna Szalai