I get backups like backup_migrate_RNWcD4.mysql.gz instead of the expected tokenized (as in with my site name and timestamp) filenames. I think this is because the module is uploading the 'temporary' file to Dropbox, not a resultant file. That is, the $file->filepath() resolves to /path/to/my/drupal//sites/example.com/files/tmp/backup_migrate_RNWcD4.mysql.gz.

Comments

sillygwailo’s picture

Status: Active » Needs review
StatusFileSize
new610 bytes

Here's a first attempt at a patch. The filename is somewhat hacked together. Maybe there's a function that renames the tempoarily-created file in Backup and Migrate that I'm missing?

sillygwailo’s picture

StatusFileSize
new601 bytes

(The above patch is for a potential Drupal 7 port.)

The patch attached to this comment is for the D6 branch, using PHP's realpath() and D6's variable for the temporary file path.

ded’s picture

The patch in #2 works for me.

brunorios1’s picture

The patch in #2 works for me.

niklp’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #2 works for me against the dev on this date, Drupal 6 version.

Neil Adair’s picture

Patch in #1 worked for me on D7 backup_migrate_dropbox-7.x-1.x-dev for both db and files

wundo’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to 6.x and 7.x thanks folks!

Status: Fixed » Closed (fixed)

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

svennv’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Closed (fixed) » Needs work

Apparently patch #2 got applied to the download for drupal7 too, where it doesn't work properly.

variable_get('file_directory_temp', '') doesnt resolve properly and should be variable_get('file_temporary_path', '') in D7

danny englander’s picture

Hi I have created a new patch for Drupal 7 here:

http://drupal.org/node/1326534#comment-5706902

It fixed this and the issue there for me as well.

wundo’s picture

Status: Needs work » Fixed

#1326534 is committed, marking as fixed.

Status: Fixed » Closed (fixed)

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