Snapshot never finishes initial sync with Dropbox.

I'm running Snapshot version 2.4.2.5. The initial sync never finishes. From what I can tell, the plugin keeps trying to send files remotely then fails.

I've tried, deactivating, reactivating. I've tried manually starting a task. On the Snapshot dashboard it looks like the database snapshots are working however it's pending an upload to Dropbox: https://cloudup.com/cc0v8Biy14E and https://cloudup.com/c2wsxucSGpD.

Here are the errors filling up my error log: https://cloudup.com/cU0CBa7c6XW. Any idea how I can get this working?

This website is hosted on WP Engine.

  • aristath

    Hello again @Austin Ginder!

    That's weird...
    Could you please grant me access to your backend so that I may see exactly what is happening?
    To do so, from your dashboard go to WPMUDEV => Support => Support Access and click on the "Grant access" button.

    I have also notified @Paul, the plugin developer on this one.
    Hopefully his insights will help us figure this one out.
    Please keep in mind that plugin developers have a lot of responsibilities so this could take a bit longer than a normal ticket.

    P.S. Doesn't WP-Engine already keep daily backups of your site?

    Cheers,
    Ari.

    • Austin Ginder

      I've enabled support access. Understandable. I'm in no rush to figure this one out.

      WP Engine's backups are very limited. They do make automatic snapshots for the last month and a half. These snapshots only contain database, themes and plugins. No upload directory. Also there is no way to automatically download these snapshots. You have to manually request a download link then WP Engine sends an email with a link to the snapshot.

      As far as making a full backup there are two options, both require manual intervention. (1) I can open a support ticket to WP Engine and request a backup of my upload directory (2) I can FTP to my server and download a copy of my upload directory.

      In my opinion backups should be automatic and in my control. I shouldn't have to manually do something each time I want a full backup. Hence the reason I've decided to use the Snapshot plugin.

  • Paul

    Hello again @Austin Ginder,

    Firsts lets cover the error log warning. First these are PHP Warnings. So not critical. But as you mentioned they are adding to the bulk of you server data.

    Both of these appear to be related to the PHP function flock(). See http://www.php.net/manual/en/function.flock.php

    Basically in wp-content/uploads/snapshots/_locks/ snapshot will create a process file while it is running for a particular item. This is a) to let the cron process know not to start another process and be to collect information about the running process like the send status, percent file upload etc. With PHP when the process stops the lock is automatically removed from the file.

    What is confusing me at the moment is the warning your system is showing. It reads "PHP Warning: Missing argument 3 for flock()". Well as you can see from the PHP link to the function the third argument is optional. So technically PHP should not be kicking a warning for this.

    You have enabled support access so let me go gather some information about your site and I'll be back. Thanks for your patience.

  • Paul

    @Austin Ginder,

    One other interesting thing about that warning. And I'll post one line here. It might be that WPE has some special PHP scripts which intercept the normal PHP functions like flock(). Here is the line. Note the name of the file 'php_prevent_flock.php' so something leads me to believe WPE does not like anyone using flock.

    PHP Warning: Missing argument 3 for flock(), called in /nas/wp/www/XXXXXXXXX/wp-content/plugins/snapshot/lib/snapshot_locker_class.php on line 36 and defined in /nas/wp/www/common/production/php_prevent_flock.php(5)

    As for the other issue of the sync not finishing you could just be hitting a timeout issue. From the snapshot log I see the process is running then just goes away. This is a typical indicator that the server or some higher level PHP definition is just stopping snapshot from finishing.

    Since theses are syncs you might try deleting the existing ones. Then run just a sync on the plugins files. Let that complete. Then edit the snapshot to add themes, etc. The initial bulk sync is always the longest.

  • Paul

    @Austin Ginder,

    I think I see the issue. From the log it appears the themes and plugins files are synced. But appears the media folders are where things are dying. From the log there are 28k media files. See below. Snapshot will try sending each section one at a time to Dropbox. Then once the section finishes it marks it as complete. The problem you are having is the media section never finishes. So it just tries over and over. Let me do some coding this afternoon to try and do sub-sections within the media section. See if we can get some of this complete.

    2014-05-19 09:57:24: Files sync start for section: themes 0 files ---------------------
    2014-05-19 09:57:24: Files sync end for section: themes ---------------------
    2014-05-19 09:57:24: Files sync start for section: plugins 0 files ---------------------
    2014-05-19 09:57:24: Files sync end for section: plugins ---------------------
    2014-05-19 09:57:24: Files sync start for section: media 28709 files ---------------------

  • Paul

    @Austin Ginder,

    After looking at the code for the Dropbox sync I'm not sure there is much else I can do at the moment. I had thought maybe the issue was snapshot was restarting each time. This is not the case. Snapshot actually keeps a log of the finished files. And if the process is stopped it knows to restart from that last position. Still doing some testing on my development server. Will post back if I come across anything.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.