[Snapshot Pro] Snapshot keeps losing connections

Across all my sites on different hosting providers disconnect or lose their scheduled backups and no longer backup. This has been going forever. The system should email you if the connection is broken or no longer updating as this would help greatly. I have a couple of sites that have not backed up in months because of this.

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    Sorry to hear you are having this issue. We have some reports on Backup failing then removing the configuration.

    Is the setting the Managed Backup or Regular Snapshot backup?

    Wouldn't you mind please, try to reset your Backup API o HUB > Backup > Setting

    Then go to Managed Backup save the new Key.

    Wait for some minutes until the new API key is updated, then try to run a new Managed Backup and check of this can complete. If so check the next Backup Cron if the configuration still working fine.

    Let us know the result you got.

    Best Regards,

    Patrick Freitas

  • ninjamonk
    • Flash Drive

    I have done this before why does it keep on happening on different hosts.

    My issue here is not reconnecting it but the fact that it randomly disconnects and stops backing up without any warning. I pay for extra storage and not a small amount for the service a year and I expect it to work well in regards to backups.

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    Hope you are doing well.

    The developers are working to fix it, some of the installations are losing the settings, I believe can be related with failed backup, backup failing and disabling the Managed Backup, this why I suggested run the backup manually and see if this completes. If the manual Backup fails, we can fix it and check if the setting issue will be gone too.

    Let us know if the manual backup completed.

    Best Regards,

    Patrick Freitas

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    How are you doing today?

    Wouldn’t you mind please, send us some information and I can forward to developers?

    For the sites that you are having this issue.

    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:

    Subject: “Attn: Patrick Freitas”

    – Site login URL:

    – WordPress admin username:

    – WordPress admin password:

    – FTP/SFTP credentials

    Host:

    Username:

    Password:

    Port:

    – cPanel credentials

    Host:

    Username:

    Password:

    – Folder path to the site in question:

    – Link back to this thread for reference

    – Any other relevant URLs/info:

    Please, reply to the ticket once you have sent the information.

    Best Regards

    Patrick Freitas

  • ninjamonk
    • Flash Drive

    Thanks, yes I had another one today, and it was a failed back up and it had disconnected and lost the schedule settings. I have hit the retry and it uploads fine, they all manually backup fine. Please let me know when the bug is fixed. Also my suggestions on emailing admins on failed backups and a lose of connection to the service would make me feel more confident in the system as at the moment I am not at all and am looking at other solutions.

    I can’t give you ftp details and users etc as its across the board its happening and I don’t have time to go and create these things for all the sites.

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    We released a new plugin version, please, give a try updating the plugin version, we added some fix for this issue.

    However, we can try to find the common cause on your backup failure, can you check the Snapshot logs? You can find it on Snapshot > Managed Backup > Backup Logs.

    Please, check your Backups schedule, make sure there are no two or more backups running on same time on same server.

    You can also add some defines on wp-config to help plugin create the full backup.

    /* Snapshot Settings */
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 150);
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 150);

    If those not fix the backup issue.

    Wouldn’t you mind create an FTP for one of your site where we can see the Snapshot logs?

    Please, let us know if you need any further help on this.

    Best Regards,

    Patrick Freitas

  • ninjamonk
    • Flash Drive

    Hi, The issue seems to be this

    [Remote][2019-06-26 23:40:10][Warning] API connection to get-token returned non-200: 401

    [Remote][2019-06-26 23:40:11][Warning] Unable to exchange token

    [Remote][2019-06-26 23:40:11][Warning] API connection to credentials returned non-200: 401

    [Remote][2019-06-26 23:40:11][Warning] Unable to connect to the API: 401

    Happens on my sites. Now I am not changing anything my end so this is a problem with your plugin. It needs to handle login errors caused by something your end better and try again later other than shutting down backups altogether.

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    Sorry to hear this is happening.

    There are many facts that can change on a site, plugins/theme/WordPress receive updates.

    Most of those errors are related with API, about losing configuration we constantly release plugin update with enhances, if updating the API not fixes the problem, is possible you are getting an error while uploading the backup.

    You can try to add this as a mu-plugin, mu-plugin guide, https://wordpress.org/support/article/must-use-plugins/

    <?php
    function snapshot_custom_size_increment() {
    return 5 * 1024 * 1024;
    }

    add_filter( 'snapshot_model_transfer_part_size_increment', 'snapshot_custom_size_increment' );

    Then try to run a new backup, if this fails again, please, grant the support access and we can have a closer investigation.

    Best Regards

    Patrick Freitas

  • ninjamonk
    • Flash Drive

    The backups don’t fail when I manually do them. Also I have the api login error and this causes the whole thing to reset. Please fix this bug. If the API request cannot be made your end to not reset the connection. It is starting to get annoying to have to resetup the schedule everytime.

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    As previously mentioned we are not able to replicate on our sites, we had some report before but I checked with the developer and the latest version should fix this, however, we do need to run some tests and give a close look on your end and check why it is causing this behaviour on your WordPress installation.

    For that, we would need at least one of the website credentials, and I will be escalating this thread to our developers and unfortunately, we can’t debug without those.

    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:

    Subject: “Attn: Patrick Freitas”

    – Site login URL:

    – WordPress admin username:

    – WordPress admin password:

    – FTP/SFTP credentials

    Host:

    Username:

    Password:

    Port:

    – cPanel credentials

    Host:

    Username:

    Password:

    – Folder path to the site in question:

    – Link back to this thread for reference

    – Any other relevant URLs/info:

    I really appreciate the understating and hope we can improve this.

    Please, reply to the ticket once you have sent the information.

    Best Regards

    Patrick Freitas

  • ninjamonk
    • Flash Drive

    I am a developer with over 20 years experience and the cannot replicate response is poor when I am showing you a log which shows what is happening according to your own code. You can replicate it manually and see what is going on to cause the connection reset. The bug about why it is unable to connect is another issue but the error handling of this should not result in the backups being halted and the schedule being reset and the connection being reset. Do you not have logging on your end?

  • Leonidas
    • Developer

    Hi there ninjamonk

    sorry to intervene, but there are some clarifications needed here.

    What my colleague means in his previous responses is that we can’t replicate the reason why your installations keep having issues logging in to our API.

    It’s worth to mention that, not all API connectivity issues are designed to result in resetting the Snapshot settings. According to the log you posted though, you get

    [Remote][2019-06-26 23:40:10][Warning] API connection to get-token returned non-200: 401
    [Remote][2019-06-26 23:40:11][Warning] Unable to exchange token

    which most probably means that the current Snapshot key on your site can not be validated, so the authentication process between your site and our API can not be completed.

    Reaching that stage, like you said, results in your site losing the connection and a reset is needed in order to make backups go again. But, that behavior is actually the designed one, for those specific type of scenarios. If the Snapshot key can’t be validated, a reset must be done because we have to guarantee the validity of said connection.

    Now, those specific instances of keys getting constantly invalidated, that’s something we haven’t experienced in other sites. The reason we would need access in one of your sites is to focus on that, pinpoint why this keeps happening and provide with a fix to be done with those issues on your end.

    You said that this is happening to more than one site of yours, so there must be a common denominator for this to keep appearing on your end. In any case, we should focus on why this keeps happening to one of your sites and then we can look into how this can be easily fixed on all of them. So, if you agree, you can provide with WP&FTP access like Patrick Freitas mentioned above and we will take a look asap.

    Best regards,

    Leonidas

  • Patrick Freitas
    • Staff

    Hi ninjamonk

    Hope you are doing well.

    I can see some sites you have both www and non-www version on HUB, this happens because the site can be accessed on both versions.

    The WPMU DEV dashboard plugins will identify the URL of your site and add on HUB, if the site can be accessed on both www and non-www it will add two versions, to avoid this behaviour, you can create a 301 redirect to the wished version avoiding the wp-admin be accessed on both www and non-www version.

    Once you create the 301 redirects, remove the wrong version from the HUB keeping only the wished one.

    I will forward this new information to Snapshot Developer.

    Please, keep us posted.

    Best Regards

    Patrick Freitas

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.