1.0 2014-04-16 15:30 UTC



Please use this package for Laravel 5 and up:

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!

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..


Generate a permanent token for the package

  • Go to 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.

Using the package

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


  • 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


/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

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


Dropboxbackup is under MIT License


© 2014 Barna Szalai