Snapshot not running automatically or manually?

I have installed Snapshot and created a daily backup which backs up to Dropbox. The initial backup ran well, but subsequent backups have not run. The backup was set to run once daily.

I have also tried to run it manually, but it does not seem to be backing up.

Please advise.

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    Thanks for granting support staff access, I could access your site, while accessing the snapshots settings and main snapshots page I got time out error. It appears the resources required to backup the site are not sufficient. That is common problem with backup plugins.

    Please increase the memory limit and max execution time as explained in this article.
    https://premium.wpmudev.org/blog/increase-memory-limit/

    I checked the snapshot and can see there are three archives on these dates.

    14 Dec 2015 6:03 am
    
    14 Dec 2015 5:58 am
    
    12 Dec 2015 9:56 am

    Snapshot uses native WordPress scheduling system that depends on http request/live site traffic. Its not 100% even on high traffic sites. If you want to replace WP cron with system cron then here is a nice article on how to do that.
    http://support.hostgator.com/articles/specialized-help/technical/wordpress/how-to-replace-wordpress-cron-with-a-real-cron-job

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Ellen

    Hi Sajid,

    Thanks for the quick response, much appreciated.

    I have tried to change the settings based on the link, but it has not made any difference unfortunately.

    There was no php.ini in the wp-admin folder, so I created one and tested it out. This didn't work. It didn't work either with php5.ini.

    I have also ammended the wp-config.php file to 3000M (even though my hosting provider only has 512MB max). This has not made any difference.

    Please let me know what to do next.

    Thanks.

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    I am keep getting invalid access token while accessing your site with support staff access. Please revoke access and then grant again so I can take a closer look.

    Also, would you mind sharing the error message from error log (mask the security information like username) related to this issue so we can determine what exactly is causing the issue here.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    Thanks for granting support staff access again. I could login and can see the snapshot is creating backup archives successfully. Last time I checked there were three backups and today there are nine backups.

    Please remember that all backups of snapshots are located in under archive page. You can go there by going clicking on Archives : View link under "Archives" column as seen in attached screenshot or use following link while logged in as administrator to go to archives page.
    http://www.habitofgreatness.com/wp-admin/admin.php?page=snapshots_edit_panel&snapshot-action=item-archives&item=1449912962

    I also checked that scheduled backups files are also being sent successfully periodically as indicated on top right side of the snapshots page.

    For run now snapshot option, it also scheduled the backup of snapshot in the background before the next scheduled check.

    Hope that makes it more clear, if you are still need further assistance please don't hesitate to ask.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    Yeah, I got your email containing administrator and FTP details, thank you.

    I have tried creating a new snapshot without files (only three database tables) with 5 minutes interval and its working perfectly fine automatically. I stayed on site and monitored the process. It does initiated first time and also twice after that with 5 minutes interval. It created the zip archive and also stored on dropbox successfully (see screenshot). Please note that I have not run the backup manually at all, it was all automatic.

    Then, I went ahead and created another snapshot with files + database tables with same 5 minutes interval and it worked fine again. Its created the backup at first when I initiated the back and then created another zip archive after 5 minutes automatically. Its also created zip archive and stored the zip on dropbox successfully (see screenshot).

    I have changed its interval from automatic to manual so it should not keep the backup creating after five minutes and save the server resources.

    After these tests, I can confirm that snapshot is working the way it suppose to work. The reason it delayed for you might be because your site is under maintenance at the moment and does not have enough traffic at the moment. Once you will go live it will work fine for daily basis automatically.

    Take care and wish you happy new year :slight_smile:

    Cheers, Sajid

  • Ellen

    Helo Sajid,

    Thanks for helping me out.

    Unfortunately there were a few instances that the backup jobs did not complete. I had another good look at why this might happen. What I have done now is split one job up into 4 separate jobs. That way the file size will remain small for each job. It appears the total file size per job is about 50MB max. If I split it all up into smaller pieces, everything is backed up.

    Would there be another way to back it all up into one file? It seems my hosting provider only allows a maximum of 50MB per file.

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    I don't think there is any limit where snapshot only backup maximum of 50MB per file. It is capable of backing up bigger files than this.

    I again, logged in and checked your site snapshot settings and found two issues. One is you have disabled WP Cron in wp-config.php file. You can see full message in Snapshot > Settings > Server Info > WP_CRON. I have also posted it here too.

    WP_CRON - Disabled. Check your wp-config.php for the DISABLE_WP_CRON define. When scheduling snapshots to run you will need to call the wp-cron.php file from an external source

    Remove the define you added in wp-config.php file you added to use manual scheduling.

    Secondly, I see that you have maximum execution time is set to 30 seconds only. That is why bigger snapshots are not being created. Please increase the max execution time (I have set 300 seconds on my own site, that is 5 minutes).

    To increase the max execution time, you can install following plugin. This will increase the the execution time, there are no settings just install and activate. Don't forget to take a back of your site first (at least .htaccess file of root).
    https://wordpress.org/plugins/wp-maximum-execution-time-exceeded/

    After installing the plugin you can see the change in Snapshot > Settings > Server Info > Max Execution Time (its set to 30 seconds now).

    Hope that helps! If you still need assistance, please don't hesitate to ask.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Ellen

    Hi Sajid,

    The maximum the hosting provider allows is 50MB. This had to be changed by adding a php.ini file with the additional info. I have removed this php.ini file and now the upload_max_filesize is 2M and post_max_size 8M.

    After having installed the plugin, the max_execution_time is still 30 unfortunately.

    Lastly, yesterdaty I disabled the WP_CRON and used the server based CRON as requested in one of your first posts. I noticed yesterday that some snapshots that were small in filesize did not run unless there was website activity. It appears now that the server based CRON job has fixed this issue.

    I have noticed in the settings of Snapshot that ZLib Compression is off. Is Zlib needed for ZipArchive? If so, this might be a solution?

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    If there is restriction from hosting then I am not sure we can increase/override it with local php.ini in some cases servers does not allow this specially on shared hosting.

    After having installed the plugin, the max_execution_time is still 30 unfortunately.

    I can see the change, I am not sure its a plugin or you increased it manually. In snapshot settings I can see the Max Execution Time is 300 seconds (that's what this plugin suppose to do).

    I am glad to know the server side cron did the job and its working now.

    I can see the ZLib Compression is set to 1 that means its installed. However, I am not totally sure whether its necessary or not but on most servers (linux, windows) its already configured so this is not the issue. Also if its the reason than it would not compress small files into .zip archives.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Ellen

    Hello Sajid,

    It seems we have just crossed paths at the same time. I had just changed a couple of things in the last hour after searching for some time on the net. I managed to increase the max_execution_time to 300 not through the plugin, but through an additional .ini file. I have just created another backup test job that will backup all the files and therefore it would be a bigger .zip file. Unfortunately it appears the higher execution time still does not allow me to backup the file. Aside from the max_execution_time, would there be other settings that also need to be increased to ensure the backup of bigger files do run?

    Alongside the higher max_execution time, I have managed to set ZLib Compression to active. This also has not had any effect.

    The server side cron job has helped making the backing up of the smaller files more stable.

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    Weird, what is the file size of your zip archive ? Is it in GBs ? If its MB then the settings you have should do the job. You have 500MB and 5 minutes execution time that is enough to create a snapshot.

    It appears there is restriction from your host, can you contact your host and ask them to increase the limits. Lets see what they says.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Sajid

    Hi @Ellen,

    Hope you are doing good today :slight_smile:

    Thanks for providing more details about this issue.

    I talked with the developer a while ago for creating snapshots of bigger files in GB and he said they are working on it. Not sure what library or compression method they would select but hopefully you will see improvements in the plugin soon.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.