Backups not working

I am using Snapshot Pro for backing up my client's site. I have set up her Google Drive and successfully authorized it. Her Google Drive is also set as the destination.

My current snapshot set up is for a once weekly backup (not a very busy website) and it's not scheduled again until next Monday. Yesterday, I wanted to test the destination so I clicked on "Run Now" under the snapshot name in the snapshot listings page. Then under the Interval column there was a notice that it was creating a backup. However, it's a day later now, and it has still not yet shown up in the client's Google Drive folder. Is it also supposed to be listed in the snapshot under "All Archives" at the bottom of the page? I currently have zero archives listed there even though I have been running the backup (previously set to local destination) for a couple of weeks now.

  • Kasia Swiderska

    Hello Yvonne,

    I run smaller snapshot with only database to see it that will work - and it looks like it is sending file to google drive. Can you check if file is actually there?

    Even copy was not send to gdrive it should create at least one local copy - first thing we could start it to increase memory limits
    https://premium.wpmudev.org/blog/increase-memory-limit/

    Then is to check if this is not some type of plugin conflict - it require to run a quick plugin conflict test as illustrated in getting support manual (flowchart).
    http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    let me know how it goes.

    kind regards,
    Kasia

  • Yvonne

    Kasia,

    There are 3 zip files in the client's Google Drive now. 2 of the 3 have the same filename. Did you make 3 backups?

    Also I just checked the local files in the Uploads folder and there are now 2 zip files there.

    In the settings, the memory limit is listed as follows:

    256M - WP_MEMORY_LIMIT defined by WordPress wp-config.php.
    256M - WP_MAX_MEMORY_LIMIT defined automatically by WordPress

    Should it be even larger? I have the database segment size set to 1,000...is there a similar setting to break the site files into separate upload segments like is done for the database tables?

  • Nithin

    Hi Yvonne,

    Hope you are doing good today. :slight_smile:

    There are 3 zip files in the client's Google Drive now. 2 of the 3 have the same filename. Did you make 3 backups?

    Kasia is not online at the moment, so I'm not sure about how many backups were taken. I'll ping Kasia regarding this, and will update you.

    Should it be even larger? I have the database segment size set to 1,000...is there a similar setting to break the site files into separate upload segments like is done for the database tables?

    There is a new version of Snapshot Pro v3.0 available, would recommend to update the plugin to the latest version, it's a improved version with more features, and we would like to test this with the latest version. I'm afraid, there isn't any such option to separate upload segments for site files.

    However would recommend you to increase your memory limit, to a minimum of 512M. To increase your memory limit, you'll have to create a php.ini file in your root directory, with the following rule in it:

    upload_max_filesize = 100M
    post_max_size =256M
    memory_limit = 512M
    file_uploads = On
    max_execution_time = 180

    You can find more info about increasing you memory limit, in this link: https://premium.wpmudev.org/blog/increase-memory-limit/

    Please let us know how the backup works with the latest version, so that we could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Yvonne

    Hi Nithin,

    I have updated Snapshot Pro on both sites that I use it on. I have also created a new php.ini file with the information you specified. I confirmed using a phpinfo.php file that the specifications have been updated on both sites.

    The full backups are still not working.

    I have also tested with the new managed backups feature on both sites and nothing gets backed up.

    What is working:
    - backups tested and working for database tables (all checked). These backups appear in both the local folder and the destination folders for both sites (one is dropbox, the other is google drive).
    - backups tested and working when just Theme Files and all database tables are checked.
    - backups fail when any additional files are checked (plugins AND/OR uploads)

    What should I try next?

  • Nithin

    Hi Yvonne,

    Hope you are doing good today. :slight_smile:

    To troubleshoot the issue further, I would like to check your website, and it's configuration. Could you please enable support access, so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, that we could help get this resolved. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Yvonne,

    Hope you are doing good today. :slight_smile:

    It seems like the snapshot is failing when it comes to media/plugin backup, and it would be the same case in full backups. This could be that the media files are large in size. Could you please specific the size of your media folder?

    To troubleshoot the issue further, could you please enable debug mode.

    To enable it, open your wp-config.php file located in your root directory, and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add:

    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    After making the above changes, please try to take a snapshot of your media/plugin backup. If the backup fails, the errors will be saved to a debug.log log file inside the /wp-content/ directory.

    Please attach these in your next reply in txt format file, so that we could give a closer look. You can find more details about debugging here.

    Please let us know how that goes, have a nice day.

    Kind Regards,
    Nithin

  • Yvonne

    If by media folder you mean uploads folder, then it is 279.2M but the other project I'm working on that is also having this issue is a whopping 1.20G (lots of images but I also have SmushPro installed in both projects).

    The plugin folders are 42.7M and 74.5M respectively.

    I have enabled debugging mode and re-tried the snapshot. I have attached the log file here.

    The log specifies a custom template file in the child theme with 2 PHP notices related to how the code displays an image in the background of the header.

  • Adam Czajczyk

    Hello Yvonne!

    I checked the debug.log and the site. The debug.log indeed doesn't help much because there are only notices coming from a theme that doesn't seem relevant at all. So, we need to take a different route :slight_smile:

    I run some more tests on your site (using "wpmu three" snapshot) and found out that the issue occurs in a very specific case:

    regardless whether database tables are backed up or not it only happens if both "plugins" and "media" kind of files are included; if only "plugins" or "only" media (regardless of other files) are included the snapshot completes fine.

    Furthermore, as it happens in this case only it also happens with a single, specific item so I believe that:

    - this may be related to resource usage that's caused by ajax performing backup
    - identifying that particular file could help us diagnose it

    I asked our Snapshot developers for a little help on this and I'm waiting for their replay so please keep an eye on this thread for further information and also please make sure that the support access to the site is open.

    Best regards,
    Adam

  • Yvonne

    Thanks Adam,

    Re: Ajax.... do you mean your plugin uses Ajax to perform the backup or do you mean perhaps Ajax being used in one of the plugins is causing a conflict?

    A couple of points to add context to the issue:
    - backups are also not working on the other site where I have the plugin installed. I haven't tested as extensively as this site we are working on now. But I thought you should know it's not isolated to only this site. I did mention this in the original post but since you're new to this thread, I wanted to bring it up again.
    - I have enabled support once again

  • Nithin

    Hi Yvonne,

    Re: Ajax.... do you mean your plugin uses Ajax to perform the backup or do you mean perhaps Ajax being used in one of the plugins is causing a conflict?

    Adam Czajczyk meant was about the Ajax response generated by Snapshot plugin, when it tries to take a backup. There could also be issue with response parsing, and hence one of the files in your plugins, or medias folder maybe too large, and that might cause this issue.

    To troubleshoot this further, could you please send us your credentials, so that we could give a closer look.

    You can send credentials by using our secure contact form: http://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic.

    - To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Yvonne,

    Hope you are doing good today. :slight_smile:

    Thank you for sending credentials, I checked your dashboard, and I was able to get the same error. It seems like the ftp credentials is pointing to an empty folder, could you please check these, and correct this out for us, so that we could give a closer look at troubleshooting.

    Please let us know once you made the following changes, so that we could help get this resolved.

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Yvonne,

    Hope you are doing good today. :slight_smile:

    Regarding full backup to our server, ie under Snapshot > Managed Backups. I made a test backup, and it seems to throw the following error as seen in the screenshot. I checked this with the developer, and it seems like there is an issue with how the response to the admin ajax is being disabled somehow, it could a plugin conflict.

    Since I accidentally deactivated the Snapshot plugin, while deactivating the entire plugin. Now, in order for the managed backup to work, you'll have to enter the secret, under Snapshot > Managed Backups to activate.

    Could you please add the key, and activate it. And please deactivate all the plugins, and then try performing a full backup to our server, and please check whether it works.

    I also tried taking a Snapshot, under Snapshot > Add New, and it fails when I include the plugin folder. Snapshot works fine if I exclude plugin folder. This means that one of your plugin is large in size, and hence causing this issue. Alternatively, what you could do is manually exclude the /plugins folder, and move it manually via FTP.

    Managed Backups to our server, and Snapshots both works differently, and managed backups are most likely to work, so please perform a managed backup with all the plugins disabled, and please let us know how that goes.

    Kind Regards,
    Nithin

  • Yvonne

    Sorry for taking so long to respond but I had to perform some manual backups in order to clone the site to a staging server so that I could deactivate all the plugins.

    These are the steps I have performed:

    - migrated site to staging server
    - on staging server, I deactivated all the plugins except Snapshot and WPMUDEV Dashboard
    - I reset the secret key
    - tried the managed backup again. It was not successful. (screenshot attached)
    - tried a full snapshot with plugins. It was not successful (screenshot attached)
    - tried a partial snapshot with plugins removed. It was successful.

    I am now in the process of testing on the staging server by deleting one plugin at a time on the staging server to isolate the problem plugin. I have not done any testing on the live site.

  • Yvonne

    Hi Nithin,

    I just tested all the plugins on the staging server copy of the site. I deleted each and every plugin except Snapshot and WPMUDEV Dashboard. I even deleted Akismet. After each plugin I deleted, I tried a snapshot which includes the plugins option. Even after deleting ALL plugins (except Snapshot and WPMUDEV Dahsboard), it still failed.

    I also tried a managed backup which also failed.

    Now what? If all plugins are deleted and it's still failing, that would seem to suggest there's no conflict with any of the plugins.

    I have also reset the secret key on the live site if you need to access that. Just please remember that it is a LIVE site and plugins cannot be deactivated on that site (landoverlandings.com) like I have been doing on the staging server.

  • Adam Czajczyk

    Hello Yvonne!

    I accessed the site and checked it and I see that the issue is still pretty much the same even with the current "almost no plugins" state. I believe the site that I accessed (the only one with support access granted) is a staging site but I didn't make any changes except updating Snapshot Pro to the newest version and creating one more test snapshot (which you will easily identify).

    The newest Snapshot however does have some better debugging/logging options so it may help us diagnose the issue. I would however like to check server error logs (if there are any available) and also output of WP debugging.

    That said, if there's no WP debugging enabled on your staging site, please add following lines to the "wp-config.php" file of it:

    define('WP_DEBUG',true);
    define('WP_DEBUG_LOG',true);
    define('WP_DEBUG_DISPLAY',false);

    Lines should be located above the "/*That's all, stop editing!*/" line.

    Also, I know that you provided my colleague Nithin previously with direct access to the site but I believe that was for a "live" site. Could you please provide me with the same set of credentials but for a staging site (the one that I tested right now)?

    You may do this the same way as you did previously (see this post: https://premium.wpmudev.org/forums/topic/backups-not-working#post-1146103).
    The only difference would be to use the "ATTN: Adam Czajczyk" as a subject of your message.

    Best regards,
    Adam