Snapshot error on restore

trying to make a staging site using snapshot, but I still get this message:

  • Nahid
    • Tech Support

    Hey JazzyDan !
    Hope you are having a great day!

    To take a closer look into the issue in order to see what's going on, the Second Level Support team would need access to your cPanel to make sure the server configuration is correct for Snapshot to work. You can send that privately through our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:

    Subject: "Attn: Nahid Mohit"
    -cPanel credentials (username/password)
    -WordPress admin username/password of backed up site
    -link back to this thread for reference
    -any other relevant urls

    We'll be looking forward to hearing back from you. Thanks!

    Kind regards,
    Nahid

  • Nahid
    • Tech Support

    Hey JazzyDan !
    Hope you are doing well today!

    Thank you for sending the credentials out. I've escalated the issue to our Second Level Support team. They'll be back to us with confirmations if this is a bug, clues, workarounds and fixes (if possible) for now in this ticket (or we'll be updating the ticket as soon as we hear back from them internally). Please note that the response time of the Second Level Support team might be a bit delayed than that of the general Support staff. We really appreciate your patience and consideration regarding this.

    Kind regards,
    Nahid

  • JazzyDan
    • The Crimson Coder

    Just got this error message, does this help?...

    Warning: ZipArchive::extractTo(/tmp/si_test/snapshot_manifest.txt): failed to open stream: Permission denied in /var/www/vhosts/cricketrunner.co.uk/httpdocs/snapshot-installer.php on line 864

  • Dimitris
    • Support Star

    Hello JazzyDan,

    hope you're doing good today! :slight_smile:

    I've already messaged our SLS team about this error message. Please keep in mind that their queue is constantly full with different issues in members' sites and they work from oldest to newest task, so their response times are much larger than ours in chats/forums. Your patience on this is highly appreciated!

    Warm regards,
    Dimitris

  • Leonidas
    • Developer

    Hi there JazzyDan ,
    Hope you are having a great day!

    We downloaded the backup zip and it seems its files have wrong permissions. After repairing the zip (or extracting and re-archiving the files) the restoration process started seamlessly.

    This is not the default behavior for Snapshot, so we want to try with a fresh backup of your site after we add define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip'); to the wp-config.php in order to see if the process goes better. Can we do that at http://www.is*************.com?

    Best regards,
    Leonidas

    • JazzyDan
      • The Crimson Coder

      I've updated the config file and made a new back-up for you (obvs the one with todays date). Feel free to try with this one.
      Can you let me know what the permissions should be, and how I can check and update them for future reference?
      Thanks again
      Dan

  • Leonidas
    • Developer

    Hello JazzyDan ,
    I hope you're having a great day and also want to thank you for your patience during our tries to resolve this issue. :slight_smile:

    Unfortunately the define didn't help the issue as hoped, so we'll keep investigating for what is going on there. For helping the debugging process, could you please add the following define in wp-config.php and take another backup?
    define('SNAPSHOT_BACKTRACE_ALL', true);
    This is for enabling a more verbose log file and could help us identify the issue.

    In the meanwhile, we could restore manually the backup at http://www.staging.is*************.com until we are able to resolve this one for you, so if you want us to do so, let us know in this thread.

    About the file permissions mentioned above, allow me to clarify: The problem lies at the file permissions in the zip file created and there doesn't seem to be a problem with the file permissions at the server. This, along with a headers error in the zip file, doesn't allow the Snapshot Migration Wizard to perform the desired restoration and produces the "We could not locate ..." warnings that you mention in the original post.

    Our next action will be trying to identify the issue responsible for producing the headers error in the backup zip file and fix it.

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hi there JazzyDan ,

    I hope you're having a great day!

    Could you add define('SNAPSHOT_SYSTEM_ZIP_ONLY', true); at your wp-config file and create another backup?

    Keep in mind that this define bypasses the use of the find binary that is used during the backup creation and may be the culprit for those headers errors mentioned above. Using this define, we instruct Snapshot to only use the zip binary to create a backup.

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hello JazzyDan ,

    I see that the backup process doesn't complete if we bypass the find binary and that's due to lack of server resources. Using the find binary, Snapshot manages to ease the burden on the server and at the event of large backups it is quite useful, so it seems to be necessary for your site. As a result, we must find a different way to fix this issue.

    One way to speed up the debugging process, is for us to duplicate manually the site at http://www.staging.is*************.com so we can run our tests there all at once, in order to investigate further what may causes this issue, without forcing you to wait for our response every time.

    If we can proceed as described above, just let us know in this thread, as we have the necessary credentials to go forward.

    Best regards,
    Leonidas

    • JazzyDan
      • The Crimson Coder

      Please go ahead. But keep in mind its a live site and live data. We need to make sure that SEO is turned off and deactivated on the staging site, so google doesn't crawl and confuse with the main site. We also need to be aware that we hold a lot of customer information in that database. Thank you.

  • Leonidas
    • Developer

    Hello JazzyDan ,

    Snapshot is not to make such changes, so I went back and investigated at your setup. It seems the backup archive, for which this thread is about, contains a .htaccess file that is instructed to edit server's PHP version, so when that backup was restored on the staging site, it could have this result you mentioned.

    Keep in mind that Snapshot creates an exact duplicate of a site, so if this particular .htaccess was the one active when the backup was created, it would also be the one active on the restored site.

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hey there JazzyDan ,

    the .htaccess isn't changed, it is exactly the same on the live site and the restored site at staging.

    It should be noted that, at cPanel's server information, it states that PHP version is 5.6.35 and phpinfo() at both the main site and the staging shows PHP version is 7.0.30. That is due to the .htaccess files at those sites.

    So, can you confirm that cPanel's server information was showing a different PHP version before you reported this?

    Best regards,
    Leonidas

  • JazzyDan
    • The Crimson Coder

    hmmm weird.
    So the process is...
    Site is running PHP7
    Make Snapshot back-up.
    Create staging site on same server.
    Restore snapshot back up.
    Site reverts to PHP5.
    Change back to PHP7.
    restore Snapshot site revers to PHP5 again
    If we could identify what is adding that line to the htaccess file it would be very helpful.
    As I have had exactly the same issue with another site on a different host. Using a different wordpress set-up.
    The only way I was able to get around it was to do a manual migration.
    I'm not sure if this is caused by snapshot or another element of the site, or the combination.
    Very odd.

  • Leonidas
    • Developer

    Hey JazzyDan ,

    that line to the .htaccess file is added by cPanel's MultiPHP Manager. The way it works is, you can choose the PHP version for each domain on your server. Right now, at your server the system default PHP version is 5.6, but on the MultiPHP Manager each domain and subdomain is listed to run with PHP7, so this adds the necessary lines to each domain's .htaccess files and overrides the system default PHP version.

    You mentioned that you changed back PHP to version 7. May I ask how you did this? Was it through MultiPHP Manager, or you used another way?

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hi there JazzyDan ,

    the migration is indeed complete but keep in mind that it was done after repairing the zip archive that was produced from Snapshot, due to the aforementioned headers error. Only after repairing the zip file, we were able to restore the site to staging.

    It is also worth mentioning that Snapshot isn't really a migration tool, so we had to manually edit all old links to the new links from the staging site, in order to make the staging site work.

    As for our next steps, now that we have an exact duplicate of the live site that produces those pesky headers error during backup, we are confident that we'll be able to reproduce the issue at the staging site, figure out what is wrong with it and provide a fix for it in the next few days.

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hey there JazzyDan ,

    I hope you're having a great day.

    After reproducing the issue at the staging site and being able to examine what is going on, it seems that the server is unable to handle smoothly the requests when creating a backup of the uploads/2015 folder due to its large amount of files. Can you check if you have any unnecessary files in there?

    Excluding that particular folder (via the Snapshot settings), makes the backup process to complete and the produced backup file is error-free, meaning it can be used in a restoration like you originally tried to, without repairing it first.

    Best regards,
    Leonidas

  • JazzyDan
    • The Crimson Coder

    Thanks Leonidas,

    Snapshot normally works great for me for migration, its actually my preferred migration tool. And everything can normally be fixed after migration with a simple find and replace on the database.

    Glad you managed to source the cause of the problem, I'll take a look at that folder and see if I can get the size down.

    Cheers

    Dan

  • Leonidas
    • Developer

    Hello there JazzyDan ,

    About the first site, it has stopped working in the same way as before, means it produces a zip archive that is impossible to restore using the Snapshot Migration Wizard? Is the uploads/2015 folder excluded from the process?

    About the second one, what is the error it gives? It does sound like a server resource-related problem but we can look into it more, if you'd like. For that, we'd need WP and cPanel credentials, which you can send privately through our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:

    Subject: "Attn: Leonidas Milosis"
    -cPanel credentials (username/password)
    -WordPress admin username/password
    -link back to this thread for reference
    -any other relevant urls

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hey there JazzyDan ,

    About the isotonik one:
    I noticed that there is this line left in the wp-config.php
    define('SNAPSHOT_SYSTEM_ZIP_ONLY', true);
    You can delete it or commend it out, try a new backup and tell us how it went. In the tests I ran at the staging site when I reported the resolution below for the original issue, I didn't use this define.

    Excluding that particular folder (via the Snapshot settings), makes the backup process to complete and the produced backup file is error-free, meaning it can be used in a restoration like you originally tried to, without repairing it first.

    About the Gila one, it'd be best if you create a new thread and our team will get back to you :slight_smile:

    Best regards,
    Leonidas

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.