My snapshot file can't be uploaded to Google Drive

Any time I try to create a Snapshot of my site and upload it to Google Drive and I’m getting an error message. This is the first time I try to upload a Snapshot to Google Drive. Local Snapshots are working fine.

  • Filipe

    Hi.

    Still not working. The Drive API is enabled:

    Error message:

    Error: Could not send file

    Google_0814_Exception: Failed to start the resumable upload in /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/google-drive/Google/Http/MediaFileUpload.php:290 Stack trace: #0 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/google-drive/Google/Http/MediaFileUpload.php(138): Google_0814_Http_MediaFileUpload->getResumeUri() #1 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/google-drive/index.php(318): Google_0814_Http_MediaFileUpload->nextChunk('PK\x03\x04\x14\x00\x00\x00\x08\x00\x10\x98\x9BK\xFC...':wink: #2 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/google-drive/index.php(262): SnapshotDestinationGoogleDrive->send_file('/srv/users/look...':wink: #3 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/snapshot.php(7270): SnapshotDestinationGoogleDrive->sendfile_to_remote(Array, '/srv/users/look...':wink: #4 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/snapshot.php(7168): WPMUDEVSnapshot->process_item_send_archive(Array, Array, Object(Snapshot_Helper_Locker)) #5 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-content/plugins/snapshot/snapshot.php(7488): WPMUDEVSnapshot->process_item_remote_files(1515002777) #6 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-includes/class-wp-hook.php(286): WPMUDEVSnapshot->snapshot_remote_file_cron_proc() #7 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #8 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-includes/plugin.php(515): WP_Hook->do_action(Array) #9 /srv/users/looking4heroes/apps/looking4heroesorg2017/public/wp-cron.php(126): do_action_ref_array('snapshot_remote...', Array) #10 {main}

    :Failed to start the resumable upload

  • Filipe

    I just verified the upload only works when the field "Directory (optional)" is not filled. If it's filled the backup fails. What can you say about that?

    Also, I guess I found another bug. When the upload to Google Drive is finished the "Status" doesn't change. See the 2 images below to understand what I'm saying:

    [image pos="0"]

    Since it's an ajax request the Status should change to Uploaded without having to reload the page.

    Anyways, your backup module is pretty "mysterious", it's not intuitive, not at all. You should make huge improvements on it. Not to mention your tutorial is really old.
    For instance, I still use ManageWP to manage my backups. Their platform when it comes to Backups and Google Drive is beautiful. Maybe you should check it out and try to do something similar or even better.

  • Katya Tsihotska

    Hi Filipe

    Hope you're fine today!

    I just verified the upload only works when the field "Directory (optional)" is not filled. If it's filled the backup fails. What can you say about that?

    Thing is, that to use a custom directory for Google Drive destination, you need to put in "Directory" field the Directory ID, the same way as you did during the setup of the destination:

    1. Create a new directory on your Google Drive.
    2. Open it and copy Directory ID from the URL

    3. Paste this ID to the Directory (optional) field

    Also, I guess I found another bug. When the upload to Google Drive is finished the "Status" doesn't change. See the 2 images below to understand what I'm saying:

    Since it's an ajax request the Status should change to Uploaded without having to reload the page.

    I was able to replicate the same on my end and discussed this with our developers, and they informed me the this is the current intended behavior. But they already working on improving this and the improvement will be implemented with the next update.

    Anyways, your backup module is pretty "mysterious", it's not intuitive, not at all. You should make huge improvements on it. Not to mention your tutorial is really old.
    For instance, I still use ManageWP to manage my backups. Their platform when it comes to Backups and Google Drive is beautiful. Maybe you should check it out and try to do something similar or even better.

    I agree with you, we will work on improving our documentation and UX of our plugins. Your feedback and suggestions are very valuable to us, it helps us to do things better, so feel free to let us know if you have any other suggestions.

    Kind regards,
    Katya