Snapshot doesn't finish backups/snapshots

Whether running a backup or snapshot they all end with the following image with incomplete file backup and the resulting empty snapshot. I have added these 2 lines to wp_config from another thread:
define('WP_MEMORY_LIMIT', '500M';
define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip';

How can I fix it? Access granted.



  • Dimitris

    Hey there Jim,

    hope you're doing good today!

    Could you please try to remove
    define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip');
    from wp-config.php file? By doing that, the default ZipArchive will be used instead of PclZip, which is almost always a better choice because it's much faster.

    We should also activate some debug logs, just in case this continues. Again in wp-config.php file, find a line like
    define('WP_DEBUG', false);and replace it with the following (if the above line doesn’t exist, simply insert next snippet just above the /* That's all, stop editing! Happy blogging. */ comment)

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors', 0);

    Then go ahead and try run your snapshot once again.
    If you experience errors again, a /wp-content/debug.log file should be created. Simply download it, rename it to debug.txt and attach it here in your next reply. If size of text file exceeds the 5MB limit of our blog, please use a service like Dropbox and post the shareable link instead.
    Ref: https://premium.wpmudev.org/blog/debugging-wordpress-how-to-use-wp_debug/

    Looking forward for your results!
    Warm regards,
    Dimitris

  • Jim

    Hi Dimitris,
    Sorry for the delay. I removed my WP installation and started over from scratch. The reason is I was using the WP Multi Network plugin to setup multiple multi-site networks. As this wasn't working as aniticipated, e.g. Pro Sites could only create one set of price tables, I decided to make the other sites separate WP installations.
    So long story short I just installed Snapshots and it successfully completed it's first Snapshot.

    However when I try to activate the Backups it doesn't accept the key, even after resetting the key:
    >> We couldn’t verify your Snapshot key. Try entering it again, or reset it for this website in The Hub over at WPMU DEV. <<

    I have installed in a sub-directory and programmed .htaccess, wp_config and the database to show only the domain name and not the sub-directory. Could that have something to do with it?

    Access granted.

    Many thanks.

  • Dimitris

    Hey there Jim,

    hope you're doing good today!

    I'm glad that you've managed to sort that out!
    I've also reached your website and noticed that Managed Backups are activated now, good job!

    Just want to point here that there's a Snapshot API key for each connected WP installation which can be found in My Websites page here https://premium.wpmudev.org/hub/my-websites/

    and has nothing to do with the WPMUDEV API key that can be found in the My Account page here https://premium.wpmudev.org/hub/account/

    Warm regards,
    Dimitris

  • Dimitris

    Hey there Jim,

    hope you're doing good today!

    I accessed your website and noticed that with a normal snapshot backup. In order to further investigate this, could you please share some more server credentials with us?
    As this is a public forum, you should send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Dimitris"
    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password)
    - cPanel/Plesk credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.

    Warm regards,
    Dimitris

  • Dimitris

    Hey there Jim,

    hope you're doing good today!

    I've made some more tests after you kindly shared some server access but I wasn't able to make any snapshot to work. I've already escalated this to our SLS team (Second Level Support) for further investigation, we'll keep you posted here as soon as you've got some valuable insights.

    Another thing that I've noticed is that you don't use the Network Setup configurations in .htaccess and wp-config.php file of this installation, as shown here:
    yourdomain.com/wp-admin/network/setup.php

    Is this an old WP installation, updated through years, or a fresh one? Please advise!
    Reference: https://codex.wordpress.org/htaccess#Multisite

    Warm regards,
    Dimitris

  • Jim

    Hi Dimitris,
    That is correct. I had to change some lines in order to get it to work, having found the solutions here in the community. The suggested code did not allow my to access my domain.com/wp_admin but forced me to go to the sub-folder where WP is installed domain.com/domain.com/wp_admin. Those changes allow me access the admin area without using the sub-folder in the URL. I am using sub-folder installation because I want to use this hosting account to host other similar sites.
    This is fresh installation, reinstalled since I opened this discussion.

  • Ivan

    Hi Jim !

    I noticed some strange issue which relates to your server. I increased a limit of files per session for Snapshot plugin from 200 to 300 and it works fine. You can find it in {wordpress_folder}/wp-content/plugins/snapshot/snapshot.php on 3793rd line.
    Of course, it's not a good idea to edit any plugin because this changes will remove after updating this plugin but there is not another solution for that now.
    Also, I'll ping our developer to add WP filter for this number. I added MU-plugin to your site ( {wordpress_folder}/wp-content/mu-plugins/wpmu_snapshot_limit_files_per_seession ) with the following code

    <?php
    
    function wpmu_snapshot_limit_of_files_per_session( $limit ) {
    	$limit = 300;
    	return $limit;
    }
    add_filter( 'snapshot_limit_of_files_per_session', 'wpmu_snapshot_limit_of_files_per_session' );

    - it will increase this limit when our developers added the WP filter for that.

    Best regards,
    Ivan.