Upgrade 4.4.3 - 4.5.1: Validation Issue Validator "restore" Returned Fail Status

When I tried to upgrade my store, this issue was happened:
Validation issue
Validator "Restore" returned fail status

File
Unable to prepare restore script.

I searched and considered all solutions from our forum but it can't fixed my problem.
Please give some advises!
Thanks,

upgrade cs.png

Usually the issue caused by the following reasons:

- wrong permissions on the restore.php file

- file cannot be reached by direct URL

Start from checking these points at first

I tried to upgrade my store again, and checked my log file what it shown :

2017-06-19 19:41:28: Executing "Accounting Migration Confirmation" validator
2017-06-19 19:41:28: Executing "Core Changes Confirmation" validator
2017-06-19 19:41:29: Executing "collisions" validator
2017-06-19 19:41:29: Executing "permissions" validator
2017-06-19 19:41:29: Executing "restore" validator
2017-06-19 19:41:29: Backup filename is "upg_core_4.4.3-4.5.1_19Jun2017_194128"
2017-06-19 19:41:29: Preparing restore script
2017-06-19 19:41:29: Upgrades directory permissions: drwxr-xr-x [****:******]
017-06-19 19:41:29: Source restore script permissions: -rw-rw-rw- [****:******]
2017-06-19 19:41:29: Directory "/[severname]/upgrades/core_4.4.3-4.5.1/" for restore script already created
2017-06-19 19:41:29: Unable to create restore script at "[severname]/upgrades/core_4.4.3-4.5.1/restore_2017-06-19_19-41-28.php"
2017-06-19 19:41:29: Upgrade stopped: unable to prepare restore file.

I checked the answer by eComlabs at : http://forum.cs-cart.com/topic/43374-upgrade-stopped-unable-to-prepare-restore-file, too.

Could you please help me to resolve it.

Thanks!

In the config.local.php file try to change

define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);

with

define('DEFAULT_FILE_PERMISSIONS', 0644);
define('DEFAULT_DIR_PERMISSIONS', 0755);

In the config.local.php file try to change

define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);

with

define('DEFAULT_FILE_PERMISSIONS', 0644);
define('DEFAULT_DIR_PERMISSIONS', 0755);

I tried and it's nothing changed, still stopped upgrading

2017-06-20 17:30:36: Source restore script permissions: -rw-r--r-- dotadb93:dotadb93
2017-06-20 17:30:36: Directory "/home/dotadb93/public_html/upgrades/core_4.4.3-4.5.1/" for restore script already created
2017-06-20 17:30:36: Unable to create restore script at "/home/dotadb93/public_html/upgrades/core_4.4.3-4.5.1/restore_2017-06-20_17-30-34.php"
2017-06-20 17:30:36: Upgrade stopped: unable to prepare restore file.

what thing should i do to upgrade the store?

PM me temporary FTP access to your server so that we can check the issue

Thank you so much! the problem was my low disk space and now I can upgrade my store normally.

Thank you so much! the problem was my low disk space and now I can upgrade my store normally.

Note that some additional code changes in the upgrade script were also made

Hi,

I get the same warning when I want to upgrade from 4.6.1. to 4.6.2.
Changing the directory & file permissions didn't work for me and I have enough disk space.
Any other possibilities I could try?

Thanks,
Ralph

Hi,

I get the same warning when I want to upgrade from 4.6.1. to 4.6.2.
Changing the directory & file permissions didn't work for me and I have enough disk space.
Any other possibilities I could try?

Thanks,
Ralph

Please check the upgrade log (var/upgrade/core_log.txt)

Please check the upgrade log (var/upgrade/core_log.txt)

Thanks! Here's my log:

2017-08-14 23:58:36: Starting installation of the "core" upgrade package
2017-08-14 23:58:36: Upgrading version 4.6.1 to 4.6.2
2017-08-14 23:58:36: Running as user "hennepplaza"
2017-08-14 23:58:36: Storing entry point files permissions...
2017-08-14 23:58:36: index.php ==> 33188 (-rw-r--r--)
2017-08-14 23:58:36: admin-cs-shop.php ==> 33188 (-rw-r--r--)
2017-08-14 23:58:36: api.php ==> 33188 (-rw-r--r--)
2017-08-14 23:58:36: vendor.php ==> 33188 (-rw-r--r--)
2017-08-14 23:58:36:  ==> 16877 (drwxr-xr-x)
2017-08-14 23:58:36: Executing pre-upgrade validators
2017-08-14 23:58:36: Found 0 validators at package
2017-08-14 23:58:36: Executing "collisions" validator
2017-08-14 23:58:36: Executing "permissions" validator
2017-08-14 23:58:36: Executing "restore" validator
2017-08-14 23:58:36: Backup filename is "upg_core_4.6.1-4.6.2_14Aug2017_235835"
2017-08-14 23:58:36: Preparing restore script
2017-08-14 23:58:36: Upgrades directory permissions: drwxr-xr-x hennepplaza:hennepplaza
2017-08-14 23:58:36: Source restore script permissions: -rw-r--r-- hennepplaza:hennepplaza
2017-08-14 23:58:36: Directory "/home/hennepplaza/public_html/upgrades/core_4.6.1-4.6.2/" for restore script already created
2017-08-14 23:58:36: Created restore script at "/home/hennepplaza/public_html/upgrades/core_4.6.1-4.6.2/restore_2017-08-14_23-58-35.php"
2017-08-14 23:58:36: Restore script permissions: -rw-r--r-- hennepplaza:hennepplaza
2017-08-14 23:58:36: Correcting target restore script directory permissions...
2017-08-14 23:58:36: ----------
2017-08-14 23:58:36: Changing permissions of "/home/hennepplaza/public_html/upgrades/core_4.6.1-4.6.2/" to 755
2017-08-14 23:58:36: Using chmod()... OK
2017-08-14 23:58:36: ----------
2017-08-14 23:58:36: Target restore script directory permissions: drwxr-xr-x hennepplaza:hennepplaza
2017-08-14 23:58:36: Correcting upgrades directory permissions...
2017-08-14 23:58:36: ----------
2017-08-14 23:58:36: Changing permissions of "/home/hennepplaza/public_html/upgrades" to 755
2017-08-14 23:58:36: Using chmod()... OK
2017-08-14 23:58:36: ----------
2017-08-14 23:58:36: Upgrades directory permissions: drwxr-xr-x hennepplaza:hennepplaza
2017-08-14 23:58:36: Checking restore script availability via HTTP
2017-08-14 23:58:36: Restore script is NOT available via HTTP at "http://hennepplaza.com/upgrades/core_4.6.1-4.6.2/restore_2017-08-14_23-58-35.php".
2017-08-14 23:58:36: Upgrade stopped: unable to prepare restore file.

And reading those last three lines our store is over HTTPS. Does that make any difference?

Getting this same error with 4.9.2 upgrade, how did you fix the issue?

2018-11-23 09:40:24: Checking restore script availability via HTTP
2018-11-23 09:40:24: Restore script is NOT available via HTTP at

You should find a reason why this file is no accessible through direct URL

You should find a reason why this file is no accessible through direct URL

it was a cs-cart bug

Exactly the same error is not updated. Restore file is not available, curl does not detect it. The problem apparently in the settings NGINX. And specifically in the directory:

    location ~ ^/(\w+/)?(\w+/)?var/restore/ {
        return 404;
    }

Config configured according to official documentation. That seems to be the problem here:
So I think developers should pay attention and help customers!

Exactly the same error is not updated. Restore file is not available, curl does not detect it. The problem apparently in the settings NGINX. And specifically in the directory:

    location ~ ^/(\w+/)?(\w+/)?var/restore/ {
        return 404;
    }

Config configured according to official documentation. That seems to be the problem here:
So I think developers should pay attention and help customers!

Amendment! It is necessary to add a directory to the NGINX configuration:

    location ~ ^/(\w+/)?(\w+/)?upgrades/ {
        allow all;
    }

then the file will be available on https, but the check is on http. but how to fix it, any ideas?

then the file will be available on https, but the check is on https. but how to fix it, any ideas?

I have the same issue when upgrading from 4.9.3.SP1 - 4.10.1.

Validation issue

Validator "Restore" returned fail status

			File
	


	
		
			Unable to prepare restore script.

The file permision is fine and I have enough space on server.

Any ideas?

It seems that the website had password protected directory that caused the issue

I had the same issue. I have a dev site which was password protected on the server. Removing the protection allowed the install script to run

If php timeout setting can be checked pre-upgrade then why can't all this other stuff be checked as well.

I am asking because I am completely ignorant :)

In my case I am attempting 4.3.9 > 4.3.10

I am just having a go while CS-Cart help is waking up in a different time zone.