Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Cannot Upgrade From 4.7.1.sp3 - 4.7.2 Rate Topic   - - - - -

 
  • victorb
  • Senior Member
  • Members
  • Join Date: 29-Oct 12
  • 179 posts

Posted 04 March 2018 - 01:32 PM #1

Hi,

 

I can not upgrade  from 4.7.1.SP3 - 4.7.2

 

https://prnt.sc/imnxvp

 

Validation issue

Validator "Restore" returned fail status

File Unable to prepare restore script.

 

Do you know why ?

 Thanks



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 548 posts

Posted 04 March 2018 - 04:07 PM #2

Hi,

 

I can not upgrade  from 4.7.1.SP3 - 4.7.2

 

https://prnt.sc/imnxvp

 

Validation issue

Validator "Restore" returned fail status

File Unable to prepare restore script.

 

Do you know why ?

 Thanks

 

This is caused because of wrong permissions. Please cd into the directory and execute the following commands respectively (sudo):

cd /path/to/your/cs-cart/dir/
chmod 644 config.local.php
chmod -R 755 design images var
find design -type f -print0 | xargs -0 chmod 644
find images -type f -print0 | xargs -0 chmod 644
find var -type f -print0 | xargs -0 chmod 644
chown -R www-data:www-data .

Kind regards,


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • victorb
  • Senior Member
  • Members
  • Join Date: 29-Oct 12
  • 179 posts

Posted 06 March 2018 - 07:07 AM #3

This is caused because of wrong permissions. Please cd into the directory and execute the following commands respectively (sudo):

cd /path/to/your/cs-cart/dir/
chmod 644 config.local.php
chmod -R 755 design images var
find design -type f -print0 | xargs -0 chmod 644
find images -type f -print0 | xargs -0 chmod 644
find var -type f -print0 | xargs -0 chmod 644
chown -R www-data:www-data .

Kind regards,

Thank you!

 

I can change file permission also from ftp ?



 
  • Wildlyfe
  • Member
  • Members
  • Join Date: 19-Mar 18
  • 17 posts

Posted 19 March 2018 - 10:50 PM #4

I am also having trouble upgrading.  I ended up having to restore back to 4.6.3, then I couldn't upgrade to 4.71. Got a "couldn't complete migration" error.  "Couldn't complete migration

20171004100816_core_add_column_position_to_statuses.php.  Reason: Duplicate column name 'position'

 

 I was able to restore back to 7.1  I now have the 4.7.1.SP3 - 4.7.2 upgrade available again, but I get "Error:  Package contains migrations that were not described in schema or schema has links to missing migration files."



 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1448 posts

Posted 01 April 2019 - 07:05 AM #5

hi guys 

 

as we do alot of upgrades and this problems keeps turning up we have found as solution to remove this part that makes the control for the script.

 

THis is not to do on a live store as if the upgrade goes south you wont be able to restore back. Try that on copy of the store or backup your store before you do try this

 

So getting that out of the way here is the solution

 

Open flle app/Tygh/UpgradeCenter/App.php

and commend out  the lines  574 to 590
$backup_filename
                    = "upg_{$package_id}_{$information_schema['from_version']}-{$information_schema['to_version']}_" .
                      date('dMY_His', TIME);
                $logger->add(sprintf('Backup filename is "%s"', $backup_filename));


                // Prepare restore.php file. Paste necessary data and access information
                $restore_preparation_result = $this->prepareRestore(
                    $package_id, $schema, $information_schema, $backup_filename . '.zip'
                );


                if (!$restore_preparation_result) {
                    $logger->add('Upgrade stopped: unable to prepare restore file.');


                    return array(false, array(__('restore') => __('upgrade_center.error_unable_to_prepare_restore')));
                }


                list($restore_key, $restore_file_path, $restore_http_path) = $restore_preparation_result;

after that upgrade works fine.

 

Hope it helps a bit to pass this problem.

 

Fotis


Fotis Kourmadas
Cs-Cart Development - Cs-Cart Authorized Reseller 

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11384 posts

Posted 01 April 2019 - 08:39 PM #6

IMHO, relying on cs-cart and PHP to properly backup files/DB that are in synch with each other is NOT a reliable solution.

Strongly suggest you utilize mysqldump and tar to backup your DB/files respectively.

Then set define('DEVELOPMENT', true) in local.conf.php and you will have a checkbox to skip the backup.

I believe this will also skip the generation of restore.php.

 

If your upgrade fails, then you simply restore the mysqldump and the tar of your files and all should be well.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1448 posts

Posted 01 April 2019 - 08:49 PM #7

IMHO, relying on cs-cart and PHP to properly backup files/DB that are in synch with each other is NOT a reliable solution.

Strongly suggest you utilize mysqldump and tar to backup your DB/files respectively.

Then set define('DEVELOPMENT', true) in local.conf.php and you will have a checkbox to skip the backup.

I believe this will also skip the generation of restore.php.

 

If your upgrade fails, then you simply restore the mysqldump and the tar of your files and all should be well.

 

 

Always take back via phpmyadmin, if you need totake a backup from your store. Its prooven many times that the internal backup system is not working properly in manyu cases and cant me imported via phpmyadmin on any other tool without editing the sql file (when its small and its possible)

 

Even better is when you first try upgrading on a stage domain (subomain, local with wamp etc) and if all goes well then do it one more time on live. I never update the live one!


Fotis Kourmadas
Cs-Cart Development - Cs-Cart Authorized Reseller 

 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 461 posts

Posted 01 April 2019 - 09:22 PM #8

Always create a momentous cpbackup.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11384 posts

Posted 02 April 2019 - 12:16 AM #9

I would not use cpbackup.  You don't want to backup and restore other data like emails.   You might be able to configure cpbackup to only backup the files in a particular directory, but seems much easier to simply use

# cd public_html; tar -czf ../backup/date_of_backup.backup.tgz
# mysqldump db_name | gzip > ../backup/date_of_backup.db.sql.gz

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Gyanprakash
  • Junior Member
  • Members
  • Join Date: 11-Jan 10
  • 10 posts

Posted 08 October 2019 - 04:20 PM #10

My solution to this upgrade error (Validator "Restore" returned fail status) for nginx  server is this:

 

Add bellow lines in nginx conf file for your domain.

    location /upgrades {
        try_files $uri $uri/;
        location ~ \.php$ {
                try_files $uri =404;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                fastcgi_pass   127.0.0.1:9000;
        }
    }

After upgrade is finished you can remove these lines.

 


Web development: www.zasplet.si