I'd like to be able to set up my Dropbox account as a destination for the backups.

The destination page should let me enter my Dropbox credentials, and a target folder inside my Dropbox account.

This feature can use the Dropbox Uploader class (http://jaka.kubje.org/projects/dropbox-uploader/) just like the Dropbox Integration module.

Comments

Another possible library to be used: http://code.google.com/p/dropbox-php/

StatusFileSize
new1.84 KB

I'm not good with patches and stuff.

In any case, here's a prototype I created that implements this using the Dropbox Uploader library.

  • Add the two files in the ZIP to the includes folder of the module.
  • Edit backup_migrate/includes/destinations.inc, in backup_migrate_backup_migrate_destination_types() add to the $out array the following key-value:
    <?php
       
    'dropbox' => array(
         
    'description' => t('Save the backup files to a !link account.', array('!link' => l(t('Dropbox'), 'http://www.dropbox.com/'))),
         
    'file' => drupal_get_path('module', 'backup_migrate') .'/includes/destinations.dropbox.inc',
         
    'class' => 'backup_migrate_destination_dropbox',
         
    'type_name' => t('Dropbox'),
         
    'can_create' => TRUE,
        ),
    ?>

And that's it, you are ready to go.

NOTICE: The Dropbox Uploader library only supports file uploads and not the full Dropbox API via OAuth. I chose to use it because it was quick and easy, and it doesn't involve any special PEAR libraries etc. like the Google Code implementation.

If someone can create a patch from this, I would be grateful. Also, any comments are welcome.

Status:Active» Needs review

StatusFileSize
new4.12 KB

OK, I give up. Here's my patch.

Subscribing

Version:6.x-2.2» 6.x-2.x-dev

Moving this to 6.x-2.x-dev, maybe this way it'll get some attention.

No attention...?

Status:Needs review» Needs work

Thanks for the hard work on this. Since the dropbox module promises API support, I'd love to see a solution that leverages the work done there, especially if third party libraries are required for this to work.

Subscribing.

Thanks, this looks very interesting. Subscribing...

https://www.dropbox.com/developers/docs#authentication-for-mobile-devices

Mobile authentication is done using a call named token that's in the Mobile API specification section. Token takes a user's username and password and returns a working access token/secret pair to your application that you can use from then on. It's a relatively simple process, but with one caveat: you cannot store the user's password in your application. You can store a username for usability purposes or in case re-authentication is needed. However, there is no reason you should store their password.

In fact, because you are receiving a working OAuth access token for the user, there's really no need to store their username and password in your application at all. Simply store the tokens instead and use them in all of your subsequent calls. The Objective-C libraries in the SDK actually do this for you in order to make sure you get it right the first time.

It's worth mentioning here that the tokens given out via the mobile authentication process don't expire for ten years.

Project:Backup and Migrate Dropbox» Backup and Migrate

Module created, please take a look here: http://drupal.org/project/backup_migrate_dropbox

Project:Backup and Migrate» Backup and Migrate Dropbox
Assigned:Unassigned» wundo
Status:Needs work» Fixed

Project:Backup and Migrate» Backup and Migrate Dropbox

Keeping track of this thread...

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

really useful and cool module, can't wait to try for my site

Useful module, please keep up updating!!!

please add some guidance on the module page fgs

Is version 6.x-2.x working? How config? I can't backup database to dropbox.