Restore backup path urgent

My host seems to have lost the “design” directory , dont know how, they were wroking on a ticket for me that I dont think had reason to alter files, but the server went down and when it came back evrything stopped.
BUT i do have a backup design directory local but 3 weeks old, but also have a newer one in my dev site

BUT I upgraded my dev site days ago, and dont have the restore link email like this http://www.mi sitedotcom/upgrades/core_4.17.1.SP2-4.17.2/restore_2024-08-06_17-57-06.php?uak=f8875758f062b8faf0b8aafbaeae5b43e6436f1c0792d4a1b712d544347211a0

I have the zip files in var/backups but dont have the random numbers at the end to start the restore back to 4.17.2 so I can use THAT design directory for now

does anyone know how I can revert back from 4.18 to 4.17sp2 while I wait for host to investigate

thanks

You can comment out these lines of code:

if (empty($_REQUEST['uak']) || !isset($uak) || $_REQUEST['uak'] != $uak) {
    die('Access denied');
}

in the restore_2024-08-06_17-57-06.php script and try to run it again. Don’t forget to uncomment them back once done, to prevent unauthorized access to the script.

1 Like

There should be several daily backups for the whole site including database. “design” folder is relative static so you can keep one backup of each CS-Cart version after the upgrade on both local and remote for the live site.

1 Like

thanks, uncommented and cache deleted and tried again but still access denied, file permissions on it are 644, am I missing something

my code seems like this in /upgrades/core_4.18.1.SP1-4.18.2/restore_2025-03-28_13-00-52.php

public function checkAccess()
    {
        if (empty($_REQUEST['uak']) || $this->uak == "%RESTORE_KEY%" || $_REQUEST['uak'] != $this->uak) {
            echo $this->accessDeniedMessage();
            return false;
        }

        if (empty($_POST['confirm_restore']) || $_POST['confirm_restore'] != 'Y') {
            echo $this->confirmForm();
            return false;
        }

Thanks for the quote.

In this case comment this one:

        if (empty($_REQUEST['uak']) || $this->uak == "%RESTORE_KEY%" || $_REQUEST['uak'] != $this->uak) {
            echo $this->accessDeniedMessage();
            return false;
        }
1 Like