• Resolved meatbrain

    (@meatbrain)


    I have set up an automated backup using the server’s own cron system, rather than relying on wp-cron. Our website does not always get a lot of traffic, so relying on wp-cron seemed like a less-than-optimal strategy. I am following the instructions in this FAQ:
    https://updraftplus.com/faqs/can-i-run-backups-from-the-shell/

    I scheduled a one-off backup this morning using the server cron daemon, as I planned to complete the manual upgrade to WordPress 4.9.4 (the auto update fix) later today. That backup has failed in an odd way, so I need some help.

    1) This site has about 1.3 GB in the uploads directory. Past experiments indicated that full completion of zip creation was more likely with a smaller archive split limit, so I lowered that to 100 MB. This generally results in about 12 or 13 uploads zip files being created.

    If I am reading the log file correctly, the first two uploads zip files (uploads.zip and uploads2.zip) were successfully created — but when the time came to upload the zips to Google Drive, those two files were simply missing. Only uploads3.zip though uploads12.zip were uploaded. The same is true for the themes and plugins zip files — these were not uploaded to Google Drive at all.

    What would cause these files to go missing before upload?

    2) I have set the retention limit to 8 for both files and database. This morning’s backup is was the ninth added, so the earliest backup should have been deleted. It was not — there are now nine backups listed.

    Why would the backup process fail to delete an older backup?

    The log file for this backup is uploaded here:
    https://pastebin.com/uNT6QhkA

    Version info
    WordPress 4.9.3
    UpdraftPlus 1.14.2
    PHP 7.0.27
    MySQL 10.0.33-MariaDB
    Server OS: Linux

    Thanks again for your help.

    JGB

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter meatbrain

    (@meatbrain)

    Follow-up: I scheduled another one-off backup through the server cron daemon today. It completed successfully, and all files were uploaded to Google Drive.

    I would still like some information on why the earlier backup did not successfully upload all files, since if it happened once, it could happen again.

    The backup retention limit is still not being obeyed. I especially need to know how to fix this.

    Thanks…

    JGB

    Plugin Author David Anderson

    (@davidanderson)

    The backup retention limit is still not being obeyed. I especially need to know how to fix this.

    As I read the log, it is. Can you post a screenshot of your ‘existing backups’ tab, *after* a backup completes, together with a link to the log file for the just-completed backup, please, so that I can double check?

    David

    Thread Starter meatbrain

    (@meatbrain)

    David:

    Thanks for looking into this. I waited until this morning’s scheduled backup completed. If I read the log correctly, the sequence of events today was:

    1) The backup zips were created.
    2) The first few uploads to Google Drive were successful.
    3) Then, a number of upload attempts failed.
    4) The backup program proceeded to delete older backup sets.
    5) A second attempt was made to upload the files that failed earlier; this attempt was successful.

    There are now 9 backup sets listed. This is just one more than the retention limit of 8. So this is an improvement, at least.

    Can we tell why the retention limit isn’t being met? And can we tell why the uploads to Google Drive failed the first time?

    Log file: https://pastebin.com/Wg2GRUxh

    Screenshot of current backups list: https://imgur.com/a/rLhex

    Thanks!

    JGB

    Thread Starter meatbrain

    (@meatbrain)

    David:

    UpdraftPlus completed another backup (triggered by the system cron job) last Sunday morning. Overall it seemed to go well.

    However…

    The log file does show one error while uploading one of the backup files:

    16663.798 (8) ERROR: Google Drive upload error (Google_Service_Exception): Error calling PUT https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&upload_id=AEnB2Ups9g4IMnr6Mihx9Y7AQWourvMpSGV66z2jLfwMHe5XWMDwQeuYz_a9T7uzQr-e86llEF4CBhBLMvAigv3fex9zGXQdFA: (503) (line: 110, file: /home/enjoypro/public_html/wp-content/plugins/updraftplus/includes/Google/Http/REST.php)

    Full log file: https://pastebin.com/A6L0y2bW

    An interesting development is that Google Drive lists duplicate files for uploads9 through uploads11.

    Screenshot of Google Drive listing: https://i.imgur.com/xhxdac1.png

    There are still nine backups listed in the UpdraftPlus dashboard, one more than the retention limit of 8.

    Screenshot of UpdraftPlus dashboard listing: https://i.imgur.com/ubR6iYN.png

    So, questions:

    1) Do we now have any idea why the retention limit is not being met?

    2) Should I just manually delete the oldest backup (using the UpdraftPlus dashboard), and wait to see if there are just 8 backups after the next scheduled backup completes?

    3) Should I be concerned about the duplicate uploads from last Sunday? Should I worry that one or both of each duplicate pair might be corrupt?

    Thanks again…

    JGB

    Plugin Contributor DNutbourne

    (@dnutbourne)

    Hi,

    Apologies for the delay.

    1) There are 9 backup sets in total because two of them are partial backups. The database and file backups are counted separately for the purpose of pruning. As such, you have 8 ‘database’ backups (including the Jan 31st backup), and 8 ‘file’ backups (including the Jan 30th)

    2) To re-synchronise the two backup types, delete any backups that do not contain all sections of the site.

    3) The Google error is occurring because the server is triggering two backup processes simultaneously late in the backup, but the extra process is not being terminated. As such, it is likely that one or both of the doubled backup files are corrupted.

    The duplication issue usually indicated that the server is currently overloaded. I would recommend changing the time of day that the backup is taken, and see if the issue persists.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Peculiar failures in cron driven backup’ is closed to new replies.