Snapshot doesn't save to dropbox

Snapshot works fine, it creates the backup locally, but nothing is uploaded to dropbox, and no information is shown in the logs.

The app "WPMU DEV Snapshot" is authorized in dropbox, and the "/Apps/WPMU DEV Snapshot" folder is created, but always empty (although I see it in spanish as "/Aplicaciones/WPMU DEV Snapshot")

What should I do now?

  • Paul

    Greetings @fmontero,

    How are you creating the snapshots? When running a manual Snapshot the processing is two phase process. The first phase creates the local archive. Then there is a second phase initiated by WP_CRON to actually send the archive to the remote destination.

    Do you know if you have WP_Cron disabled on your WordPress site? On the Snapshots > All Snapshots listing in the top-right just above the table listing you should see a notation like the following.

    Current time: May 15, 2013 6:43 am
    Next File Send: May 15, 2013 6:45 am

    The 'Next File Send' is the part related to the second phase and shows when you can expect the files to be sent to the remote destination.

    Other thoughts. When you view the Snapshot > All Snapshots listing. in the last column of the output 'Archives' This column show the latest archive filename and below that the logs section to view the logs. But this only shows the logs for the latest archive. IF you have more then one previous archive needing to be sent to the destination you will not see the logs here.

    Instead, look for the "Archives: view (X)' on the second line of output. Click the 'view' link. This second page will show all the archive details for the current configuration. Find the old archive and view the logs. See if there is an error related to Dropbox.

    although I see it in spanish as "/Aplicaciones/WPMU DEV Snapshot"

    Should not matter to Snapshot as it does not see or have access to that top-level folder. When Snapshot connects to Dropbox the root is /Aplicaciones/WPMU DEV Snapshot/

  • fmontero

    Hi Paul,

    I'm running the snapshots manually in a blog with low number of visits as a test, so I call wp-cron.php now and then to force it to run.

    Everything seems normal. The snapshots have "Archives: Complete, Destination: Pending" as status.

    In the log file of the old archive I can see the following section repeated every half hour:

    2013-05-15 10:54:02: Sending Archive: snapshot-1368607818-130515-085018-12745d3c.zip 31.1M
    2013-05-15 10:54:02: Destination: dropbox: backup@asuni.com en Dropbox
    2013-05-15 10:54:02: Sending file chunked. Offset: 0/32607856 (0%)
    2013-05-15 10:56:37: Sending file chunked. Offset: 4194304/32607856 (12%)
    2013-05-15 10:58:50: Sending file chunked. Offset: 8388608/32607856 (25%)
    2013-05-15 10:59:55: Sending file chunked. Offset: 12582912/32607856 (38%)
    2013-05-15 11:00:46: Sending file chunked. Offset: 16777216/32607856 (51%)
    2013-05-15 11:03:11: Sending file chunked. Offset: 20971520/32607856 (64%)

    Then again, half four later, and again, and again. It never reaches 100%, but there's no error information. Find enclosed the log file.

    Best Regards,
    -Fran

  • Paul

    @fmontero,

    I've looked at the log file excerpt you provided. Are you seeing any errors between send attempts? Normally the common issue is when it gets to 100% it performs a commit command to Dropbox which sometime fails.

    The other very curious thing is the timing on the 'chunks'. See below the last set from the log file.

    2013-05-15 16:50:44: Sending file chunked. Offset: 0/32607856 (0%)
    2013-05-15 16:53:06: Sending file chunked. Offset: 4194304/32607856 (12%)
    2013-05-15 16:55:26: Sending file chunked. Offset: 8388608/32607856 (25%)
    2013-05-15 16:57:54: Sending file chunked. Offset: 12582912/32607856 (38%)

    Between the 25% and 38% it took 2 1/2 minutes. That is not right. If you are sending from a server to Dropbox this should be fairly quick. Here is an excerpt from my personal site where I send backups to Dropbox

    2013-05-13 18:03:14: Sending file chunked. Offset: 41943040\/59298069 (70%)\r\n
    2013-05-13 18:03:17: Sending file chunked. Offset: 46137344\/59298069 (77%)\r\n
    2013-05-13 18:03:20: Sending file chunked. Offset: 50331648\/59298069 (84%)\r\n
    2013-05-13 18:03:24: Sending file chunked. Offset: 54525952\/59298069 (91%)\r\n
    2013-05-13 18:03:27: Sending file chunked. Offset: 58720256\/59298069 (99%)\r\n
    2013-05-13 18:03:28: Sending file chunked commit url: https:\/\/api-

    It almost appears as though you are hitting a PHP timeout. So can we investigate on your hosting what the current script timeout is. Can you try the following:

    f you’re not sure you can check by creating a phpinfo.php. This is simple and easy. With a simple text editor (such as Notepad), create a new “phpinfo.php” file containing this code, and only this:
    <?php phpinfo(); ?>

    Upload this page to your server, and call it with your Internet browser. Now a page should be displayed telling you the PHP version installed on your server and many more detail information.

  • fmontero

    There are no errors in the logs between attemtps.

    The script timeout was 300. I've modified max_execution_time = 1200 in php.ini and restarted, but still the same is happening, it arrives to something between 70%-90% but no more.

    Here is the log chunk after modified the script timeout:

    2013-05-16 10:51:03: Sending Archive: snapshot-1368607818-130515-085018-12745d3c.zip 31.1M
    2013-05-16 10:51:03: Destination: dropbox: backup@asuni.com en Dropbox
    2013-05-16 10:51:03: Sending file chunked. Offset: 0/32607856 (0%)
    2013-05-16 10:52:50: Sending file chunked. Offset: 4194304/32607856 (12%)
    2013-05-16 10:54:47: Sending file chunked. Offset: 8388608/32607856 (25%)
    2013-05-16 10:56:46: Sending file chunked. Offset: 12582912/32607856 (38%)
    2013-05-16 10:58:52: Sending file chunked. Offset: 16777216/32607856 (51%)
    2013-05-16 11:00:53: Sending file chunked. Offset: 20971520/32607856 (64%)
    2013-05-16 11:02:43: Sending file chunked. Offset: 25165824/32607856 (77%)
    2013-05-16 11:04:16: Sending file chunked. Offset: 29360128/32607856 (90%)
    2013-05-16 11:50:37: Sending Archive: snapshot-1368607818-130515-085018-12745d3c.zip 31.1M
    2013-05-16 11:50:37: Destination: dropbox: backup@asuni.com en Dropbox
    2013-05-16 11:50:37: Sending file chunked. Offset: 0/32607856 (0%)
    2013-05-16 11:53:20: Sending file chunked. Offset: 4194304/32607856 (12%)
    2013-05-16 11:55:36: Sending file chunked. Offset: 8388608/32607856 (25%)

    Here is the phpinfo installed on the server:
    http://cursosrhino.com/phpinfo.php

    -Fran

  • Paul

    @fmontero,

    Hmm. So we went from 300 seconds where the upload percent was 50-60% to 1200 seconds which gets us now 70-90. Can we increase the timeout higher? Say 1800.

    The other option is to create smaller archives. So for example my assumption is you have created a snapshot archive contains database tables, files: themes, plugins, media. In most cases the database tables and media are what change most often. The plugins and themes less so.

    So instead of having one single snapshot you created one snapshot for database tables. A second for media files only. And a third configuration for themes and plugins. Then if we ever get these uploaded to Dropbox you can setup different scheduling. For example setup daily backups on the database. Weekly for the media and monthly for the themes and plugins. Just a though. I know many users just like having everything in a single archive.

  • fmontero

    I tried with small snapshots and it worked fine! One with just mysql tables (300 Kb) and another with plugins and themes (9 Mb) uploaded fine.

    The problem is that I still can't upload a snapshot that includes the media files. I have increased the timeout to 1800 (that is half hour) and this is the result:

    2013-05-16 15:43:20: finish: snapshot-1368711752-130516-134232-1a51e1eb.zip
    2013-05-16 15:43:55: Sending Archive: snapshot-1368711752-130516-134232-1a51e1eb.zip 31.11M
    2013-05-16 15:43:55: Destination: dropbox: backup@asuni.com en Dropbox
    2013-05-16 15:43:55: Sending file chunked. Offset: 0/32616915 (0%)
    2013-05-16 15:48:30: Sending file chunked. Offset: 4194304/32616915 (12%)
    2013-05-16 15:52:43: Sending file chunked. Offset: 8388608/32616915 (25%)
    2013-05-16 16:00:12: Sending Archive: snapshot-1368711752-130516-134232-1a51e1eb.zip 31.11M
    2013-05-16 16:00:12: Destination: dropbox: backup@asuni.com en Dropbox
    2013-05-16 16:00:12: Sending file chunked. Offset: 0/32616915 (0%)
    2013-05-16 16:02:44: Sending file chunked. Offset: 4194304/32616915 (12%)
    2013-05-16 16:05:19: Sending file chunked. Offset: 8388608/32616915 (25%)

    The upload is restarted for some reason but not the timeout (didn't reach the 1800 seconds) The slowness seem to be the reason, maybe it's dropbox that drops the slow connection. It's a 30 Mb file and the server is a new one, plenty of cpu, memory and disk.

  • Paul

    @fmontero,

    Sure of course of you install the Dropbox client on your Windows system you will get better performance. The Dropbox application uses a special API and it not limited to the same chunk send process that normal web applications.

    I'm sorry but I don't have an answer for you. This sounds to be systemic and related to the handshaking or throughput of you server configuration. In you last stream from the log file it is really taking 5 minutes to send the one chunk??

    2013-05-16 15:43:55: Sending file chunked. Offset: 0/32616915 (0%)
    2013-05-16 15:48:30: Sending file chunked. Offset: 4194304/32616915 (12%)

    The PHP API library used by Snapshot is provided by Dropbox. Sorry, I'm confused as to what is going on. Going to bring in someone more technical on the server side to see if they have any suggestions.

  • Paul

    @fmontero,

    Thanks for the update. Still 7 minutes to send a 30Mb file is dial-up speeds at best. From my own home system to Dropbox I can send a 30Mb file in under a minutes. I would expect a server sitting in a ISP farm to have multitude higher send speed. Sorry not at all trying to know your hosting or configuration.

    Still waiting for an internal contact to reply here if he gets a chance.

    Just curious what hosting you are using? Might be something I can signup for an account and test things out under Windows.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.