4.3.1 To 4.3.2 Upgrade > How To Disable Automatic Database Backup While Updating

we are currently running 4.3.1 ultimate and want to upgrade to 4.3.2… problem is that when we try to upgrade using the upgrade center, it auto starts taking full databse backup. which needs a huge amount of time as our database size is about 10gb. also i have manually taken the db backup by ssh which was much faster.



now how can i upgrade from 4.3.1 to 4.3.2 and disable the auto database backup feature?



Naman

Please try the following solution (Not tested (!))

Open the app\Tygh\UpgradeCenter\App.php file and replace:

$backup_file = DataKeeper::backup(array(
'pack_name' => $backup_filename,
'compress' => 'zip',
'set_comet_steps' => false,
'move_progress' => false,
));

with

$backup_file = DataKeeper::backup(array(
'pack_name' => $backup_filename,
'compress' => 'zip',
'set_comet_steps' => false,
'move_progress' => false,
'db_tables' => array(),
));

I had the same issue and can confirm that eComLabs' solution fixes this, thank you once again!



Please note that, like all changed files, the app\Tygh\UpgradeCenter\App.php file will be overwritten during the upgrade, so if you're having the same problem next time, you will have to add the line again.

I am glad to hear that our solution helped you.

I tried this solution but i get the same error. Can you help?

I tried this solution but i get the same error. Can you help?

What error do you mean?

Removed

I removed what I had written in my previous post because as of 4.3.10, the db_row was changed to 400 and the upgrade doesn't timeout anymore. I still stand on the same idea. If the number of rows in a table is more than a real high number, the db_row figure should be flexible to accelerate backup.

why didn't I think of searching for this weeks ago it would have saved me so many hours.

As I'm going through multiple releases to get to the current I don't really care about the backups, if it fails I just go to the manual backups.

thanks, really would be a nice option to have in the upgrade setting

You are welcome. In the latest versions there is an ability to skip backup. Check the following article

https://docs.cs-cart.com/latest/upgrade/upgrade_process.html

Hi all the fix to include db_tables => array() has been working but since I'm now on 4.4.1 things seem to have slow down again, is there any way to exclude backing up files as well, people have said it should be an option but I don't get that option presented on the screen to select.

thanks

Don't remember exactly when (what version), but if DEVELOPMENT is true, then there is a checkbox to skip the backup of db tables and files.

Thanks, any pointers to where development flag is set? ( OK got it thanks )

thomas

Usually best to do it in a local_conf.php file with code like:


Replace 'first ip', etc. with your IP address and set others as needed. You can comment out the ini_set() if you don't want errors/warnings/notices displayed to the screen of the user who's IP is a match.

You can get fancier with what SERVER elements are checked for the IP address in case you use a proxy server, or other details. But the above is the basics. Note that if cs-cart support comes to your site to help you they will overwrite this file and not clean up by replacing it when they leave (that gets old really fast).

Thanks, any pointers to where development flag is set? ( OK got it thanks )

thomas

See my post #10