[Snapshot Pro] Google Drive backup not working

Hi, I am using Snapshot to create a daily backup to my Google Drive. The thing is, it just doesn’t work. It doesnt create a backup daily… The settings seem to be correct, and the Drive connection works as well.

Kind regards

Johannes

  • Pawel
    • Staff

    Hello again Johannes!

    I’ve checked how it looks on your site. Here are my findings:

    Please log in to your website’s admin panel and go to Snapshot >> Dashboard and locate the “Managed Backups” box. There you will see that the snapshots are in fact created and they are sent to our cloud servers.

    I think the confusion may be because you configured Google Drive as a destination (I see it’s working correctly) and set up Managed Backups – which are backups that are integrated with our cloud service, not with Google Drive. So the backups are created successfully and they are sent, but not to Google Drive. Managed Backups integrate with our other services available through our plugins and the Hub, so we can’t use Google Drive or any other external disk to be able to provide those services to you.

    Single Snapshots do work with Google Drive as they are not integrated as tightly with other things as Managed Backups.

    Hope this clears up the confusion!

    Cheers,

    Pawel

  • Johannes
    • Flash Drive

    Hey Pawel,

    Thanks for your answer.

    I was not talking about the managed backups. They do, as you say, work as intended. But it is possible to set Snapshots to Google Drive to a daily backup, as I did. This is what is not working. Doing a manual Snapshot still works though.

  • Pawel
    • Staff

    Hello Johannes!

    Okay, now I get it and I apologise for the confusion. I tested it on my test site (used this plugin: https://wordpress.org/plugins/advanced-cron-manager/ to force to run the backup task so I won’t have to wait – task’s name is snapshot_backup_cron, and the plugin adds an option in Tools >> Cron Manager – you need to find snapshot_backup_cron on the list and click “Execute Now” ). It worked for me.

    I checked your setup and have an idea – can you please try to change the destination directory name to something without a space? Please see attached screenshots for reference.

    Cheers,

    Pawel

  • Pawel
    • Staff

    Hello Johannes!

    Okay, sorry to hear that. I tried it on my test site and the backups are created and sent to Google Drive – they were created in the last couple of days and I can see them in my folder.

    The destination in your case is authenticated, but just to make sure, please check if it has enough space? Maybe we missed something obvious here.

    Kind regards,

    Pawel

  • Pawel
    • Staff

    Hello Johannes!

    Thank you for the update! I would definitely like to check that as well as get more debug information from Snapshot. Please install the plugin I mentioned above: https://wordpress.org/plugins/advanced-cron-manager/

    Also, please add the following lines to your wp-config.php file in the root directory of WordPress, above the line that says “/* That’s all, stop editing! Happy publishing. */”:

    define("WP_DEBUG", true);
    define("WP_DEBUG_LOG", true);
    define("SNAPSHOT_BACKTRACE_ALL", true);
    define("SNAPSHOT_SYSTEM_DEBUG_OUTPUT", true);

    Then, please run the scheduled backup and check if there are any log files at the following locations:

    – wp-content/debug.log

    – wp-content/uploads/snapshot/_logs

    If there are, please check for messages regarding Google Drive. If you need any help with the log files, please share site access credentials, so I can log in and check them myself.

    Note: Don’t leave your login details in this ticket.

    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    NOTE: Don’t change selected topic in the dropdown, just leave it at “I have a different question”.

    Subject: “Attn: Pawel Pela

    – Site login URL

    – WordPress admin username

    – WordPress admin password

    – FTP credentials (host/username/password)

    – cPanel credentials (host/username/password)

    – Folder path to site in question

    – Link back to this thread for reference

    – Any other relevant urls/info

    Kind regards,

    Pawel

  • Johannes
    • Flash Drive

    Hey,

    So I installed the plugin and executed the task manually. It works! But the automatic backup still doesn’t do anything. I fetched the logs you were asking for. I hope they are useful.

    Best

    Johannes

    Edit: It says file type not allowed. I seem unable to upload the files.

  • Pawel
    • Staff

    Hello again Johannes!

    In that case please try configuring Google Drive destination from scratch. First, remove it completely and follow the configuration process again from start. Unfortunately I can’t help you with that, but I have a hunch there’s something wrong with the configuration/API connection.

    Kind regards,

    Pawel

  • Pawel
    • Staff

    Hello Johannes!

    Thank you for sending the credentials!

    I have an idea how to test that. I’d like to setup the Snapshots on your site to temporarily go to my company Google Drive to check if it works with it. I will also be able to access some additional logs for it in case it fails – without you needing to give me acces to your Google account. Are you okay with that?

    Kind regards,

    Pawel

  • Pawel
    • Staff

    Hello Johannes!

    Thank you! This has lead to finding the issue.

    I set up the Snapshots to go to my company GD and ran a test Snapshot – it failed with an error message on the summary page that you can go to after creating the Snapshot.

    That gave me a clue (also our Snapshot devs suggested this might be it) that there's one more thing that needs to be enabled when creating a GD Destination and setting up the keys. What's important here is that setting up the keys isn't enough. You need to also enable the Drive API for those keys…

    To do that, please go to https://console.developers.google.com/apis/library (make sure you're logged in to correct Google account if you have more than one).

    From the dropdown select your backup project:

    Then search for Google Drive API:

    After clicking on it, please Enable it:

    Now you can try running Snapshot again. It should work now.

    I'll create a task for our Snapshot team to improve this part of configuration so it's clear what has to be done and also if the upload fails provide a more meaningful message to the user – informing what action to take.

    Please let me know if that worked for you.

    Kind regards,

    Pawel

  • Johannes
    • Flash Drive

    Update: Last night the backup went through. That’s interesting. What I did was disable the Google API access and enable it again. The night before it didn’t work. So I will observe if the backup works in the next couple of days

  • Pawel
    • Staff

    Hello Johannes!

    That’s great news. I was about to ask you to do this. Actually, my idea was to create a completely new Google API project so that we could rule the possibility the configuration was incorrect or we’ve hit some kind of API wall, like exceeded resources etc.

    Please keep me informed.

    Kind regards,

    Pawel

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Johannes ,

    I see a successful snapshot that was uploaded to your Google Drive at 2019-04-21 – 04:39:16 , and a Managed Backup at 22. April 2019 – 1:20 .

    What isn’t working precisely so I can take a look? As far as I see there isn’t any issue at the moment and the backups rotated & were uploaded successfully.

    Regards,

    Konstantinos

    • Konstantinos Xenos
      • Rubber Duck Debugger

      Thank you Johannes ,

      I saw a related log from the time that the backup was supposed to start but it actually didn’t start correctly, without giving any errors though as well.

      I have changed the time of Snapshots closer to midnight as the way the backups are set up at the moment leads in a situation of all running really “close” to one another. I’m not really sure why you want to keep 3 different backups as at the moment you have nightly Snapshots and nightly Managed and the server-side automated daily Backups as well but I leave that to your discretion. That’s 3x backups with the same content at the moment and in general since we are already running nightly backups on our Hosting there isn’t really much need of a plugin-based backup as well. On a further note an upcoming version of Snapshot will also utilize our server Side backups only if the website is on our Hosting.

      I will keep an eye on the website on the upcoming days to see if the changed timers will allow the backups to run properly else I’ll forward this to our Developers as well for a closer look.

      Regards,

      Konstantinos

  • Johannes
    • Flash Drive

    Hey, the managed backup doesn’t seem to work properly, it doesnt restore custom taxonomies. The hosting backup produced an error last time I used it as well. So I want to make sure as possible that I have at least one backup that works.

  • Pawel
    • Staff

    Hello Johannes!

    We’ve noticed that Snapshot is giving an error about each failed backup stating that the memory limit has been exhausted (PHP Fatal error: Allowed memory size of 41943040 bytes exhausted is showing in debug.log). I increased the current limit to 1024M by adding the following lines to your site’s wp-config.php:

    define( 'WP_MEMORY_LIMIT', '1024M' );
    define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

    Your website has registered the change. Please wait and see if the backups have completed successfully.

    Kind regards,

    Pawel

  • Johannes
    • Flash Drive

    Pheeeew, that took a lot of time, but it seems that it is finally working reliably. Thanks! One more thing that I am not sure you saw. I am using the wpmudev hosting for my page. So this might be a thing you might change for your servers in general.

    Best

    Johannes

  • Dimitris
    • Support Star

    Hello Johannes,

    hope you’re doing well today! :slight_smile:

    One more thing that I am not sure you saw. I am using the wpmudev hosting for my page. So this might be a thing you might change for your servers in general.

    That’s a known limitation in memory limits and it’s pre-set by us. Having so large memory limits is only for these kinds of PHP-based backups (or other demanding procedures) and we’re working on making this a seamless integration, like Konstantinos mentioned here:

    https://premium.wpmudev.org/forums/topic/snapshot-pro-google-drive-backup-not-working#post-1393812

    That’s 3x backups with the same content at the moment and in general since we are already running nightly backups on our Hosting there isn’t really much need of a plugin-based backup as well. On a further note an upcoming version of Snapshot will also utilize our server Side backups only if the website is on our Hosting.

    Warm regards,

    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.