2017 © Pedro Peláez
 

library dropboxupload

Upload database dumps to Dropbox

image

bszalai/dropboxupload

Upload database dumps to Dropbox

  • Tuesday, October 25, 2016
  • by bszalai
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

NOTE!

Please use this package for Laravel 5 and up: https://github.com/backup-manager/laravel, (*1)

Database dump Dropbox upload

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!, (*2)

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.., (*3)

Usage

Generate a permanent token for the package

  • Go to https://dropbox.com/developers/apps and generate api keys., (*4)

  • Install Dropboxupload, (*5)

    composer require bszalai/dropboxupload:dev-master, (*6)

  • Create a file keys.json and fill it with your keys, (*7)

{  
    "key" : "Dropbox app key",  
    "secret": "Dropbox app secret"  
}    
  • Copy this file into the Dropbox package's examples folder (_vendor/dropbox/dropbox-sdk/examples_)., (*8)

  • Open a terminal, go to the above folder and enter, (*9)

    php authorize.php keys.json token.json, (*10)

  • 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), (*11)

  • Go back to terminal, and paste the above key, and press Enter., (*12)

  • You'll have a token.json file created., (*13)

  • Copy this file into the app/storage folder. You are done., (*14)

Using the package

  • Edit your app.php in the app/config folder, and add the following lines to the service providers, (*15)

    Schickling\Backup\BackupServiceProvider,
    Bszalai\Dropboxupload\DropboxuploadServiceProvider, (*16)

  • Publish the package config file, (*17)

    php artisan config:publish bszalai/dropboxupload, (*18)

  • Edit the config file (_app/config/packages/bszalai/dropboxupload/config.php_), you have several options, (*19)

    • prefix - name-prefix of the source file, (*20)

    • uploadfolder - where to upload the file, (*21)

    • compress - if set to true, it'll create a zip file, (*22)

    • encrypt - encrypt the source file, set the encryption key so you can decrypt your file later, (*23)

  • Create a CRON job for the Backup package, (*24)

Example:

/usr/local/bin/php53 /path/to/your/app/artisan db:backup
  • Create another CRON job for the Dropbox upload, set the run time after the backup surely finished
Example:

/usr/local/bin/php53 /path/to/your/app/artisan dropbox:upload

License

Dropboxbackup is under MIT License, (*25)

© 2014 Barna Szalai, (*26)

The Versions

25/10 2016

dev-master

9999999-dev

Upload database dumps to Dropbox

  Sources   Download

MIT

The Requires

 

by Barna Szalai

laravel dropbox

16/04 2014

1.0

1.0.0.0

Upload database dumps to Dropbox

  Sources   Download

MIT

The Requires

 

by Barna Szalai

laravel dropbox