Manual Snapshots fails at 48%

Each time I try to create a Snapshot manually it stops after 48%.

  • Predrag Dubajic
    • Support

    Hi Felix,

    Since Snapshot uses PHP for backups it can require more server resources when there are a lot of files to be processed, and that seems to be the case here since it works when your plugins or media files are excluded from the backup.

    We could try tweaking the process a bit to try and reduce the load on your server but in order to do that, we will need to have access to your files either via FTP or cPanel.
    Note: Don't leave your login details in this ticket.
    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 the selected topic in the dropdown, just leave it at "I have a different question".

    Subject: "Attn: Predrag Dubajic"
    - 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

    One more thing that you can try is to configure scheduled Managed Backup and set it to run when there are least visitors on your site, which will reduce the server load and might be enough for backup to finish.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Felix,

    The tweak was applied to your staging site wp-config.php because that's the only one I had access to.
    I tried running a new backup there now and again it finished without any problems, if you go to Snapshot > Managed Backups panel you should see that there are backups there from today and yesterday.

    It's possible that you're running the backup while the site load is high so the server resources are not enough for the process to finish.
    Can you try setting up a scheduled backup during the time when the server load is lowest and see if that will finish for you properly?

    Also, try adding this line to your wp-config.php of the live site, just above the /* That's all, stop editing! Happy blogging. */
    line and see if the backup works when it's running during low server load:
    define('SNAPSHOT_ATTEMPT_SYSTEM_BACKUP', true);

    Best regards,
    Predrag

  • Felix Torres
    • New Recruit

    Hi Predrag,

    We did not have issues with scheduled backups, as those worked fine before. We want to be able to take manual snapshots at which ever time we would like. Is there a solution that would allow us to take the snapshots at anytime whether there is a high site load or not?

  • Predrag Dubajic
    • Support

    Hi Felix,

    Backup will require more server resources since it's a WP plugin and uses PHP to perform this process, so if the site load is high it will depend on how many server resources you have left for Snapshot to use.
    Since the backups are not working during the high load you would need to check with your hosting provider which limits are being hit when you run the backup during that time and ask them if they can increase those resources for you.

    Best regards,
    Predrag

  • Felix Torres
    • New Recruit

    Hi Predrag,

    I checked with the hosting provider, and they checked to make sure that it wasnt a load error. According to them, there were no errors that would indicate an issue with server resources. Would uninstalling and reinstalling the plugin be a solution? Both the hosting provider and myself attempted another backup but both timed out. Thanks in advance for your help,

    Best regards,

    Felix

  • Predrag Dubajic
    • Support

    Hi Felix,

    It just crossed my mind now, where are you doing these tests, on your staging site or on the live site?
    Note that I only added the code to the staging site so live one doesn't have any tweaks, unless you added them as I mentioned before?

    Reinstalling the files probably won't make any difference since the backups are working at certain times (when I tested it), but then again, at this point, I'm not sure if we're both checking the staging site or not?

    Best regards,
    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hello Felix Torres

    I think there's been slight misunderstanding on our end and I'm sorry for this.

    Snapshot Pro contains two backup tools in one plugin. They are not just two "versions" of the same backup, just with different settings but actually two backup tools. One is "Managed Backups" (Snapshot -> Managed Backups) and the other one is "Snapshots" ("Snapshot -> Snapshots").

    I did check both of them (on staging site) and the Managed Backup seems to be working fine. Normally it runs on schedule but it can also be run manually - when I run it manually it completed fine (you can see the newest managed backup on "Snapshot -> managed backups" page in site's backend and in The Hub).

    However, the "snapshots" are indeed getting stuck/failing at around 47%. There's a difference, though, in "engine" powering both these backups and while we can "tweak" managed backups, there's not much we could "fine tune" via wp-config.php or similar way if it comes to snapshots.

    I did run some tests and it seems that at some point server times out. Backup process is quite resource intensive and means copying thousands of files, which also means a lot of fast read/write operations. That's usually a subject to I/O (Input/output - which basically means file read/write operations) limits that are applied to the server. Usually there are some "hard" limits on the speed of these operations and/or amount but even if not - there are certain limits that are simply a consequence of hardware available (regardless whether it's "real" or "virtual").

    In case of "snapshots" there's no option to limit the usage, while for "managed backups" we can in some cases try to minimize backup process impact on server resources. The backup itself is also created in a bit different way.

    For "snapshots" therefore in such case the solution is to "split backups" to smaller parts. I've tested it on your site and if you look at "Snapshot -> Snapshots" page you'll now notice two configured snapshots there: "Snapshot files (plugins only) and "Snapshot DB, Media and themes (no plugins)".

    Both these snapshot were run manually and both completed fine so together they form backup with that difference that it's contained within two backup zip files instead of one - but they can still be used to restore site like a single file could be, it'd just be a two step process instead.

    These two snapshots worked for me now, triggered manually. Would you try to run them the way you usually do and see if they complete for you as well? Please note though: do not run them both at once and try not doing that once other backup (e.g. scheduled managed backup) is running as this might cause significantly higher load on the server, breaking all backups as a result.

    Kind regards,
    Adam

  • Felix Torres
    • New Recruit

    Hello Adam,

    Thank you for your help. I was able to create two snapshots in the same method as the two you had made.

    The first one titled "Snapshot - Test (All plugins non-DB) I selected [Only include selected files -> All Plugins] and I selected in [Database] -> [Don't Include any database tables].

    For the second one titled "Snapshot - Test (DB, Media, Themes, No Plugins) I selected [Only include selected files -> [All Themes, Media files, wp-config.php, .htaccess] and in [Database] -> [Include all database tables]

    Please confirm if this is the correct method.

    What is the method to restore the site using two separate snapshots?

  • Predrag Dubajic
    • Support

    Hi Felix,

    That is a correct way as you will now have all the "important" stuff, your files and DB backed up separately.
    Note that this kind of backup doesn't backup WordPress files (the default ones) and for the restore, you will need to have access to your site admin in order to run the restore process.

    You can do the restore from Snapshot > Snapshots panel, click on the 3 dots on right side of your backup and select Restore.
    Do this for both the backups and that will restore all the files and DB.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.