nagashiwa Posted June 27, 2016 Share Posted June 27, 2016 Hello, I've googled around but I could not find an answer. I've made a backup of my webstore, files and sql file were made successful. However if I do upload the sql file with phpMyAdmin its somehow NOT linked at all to the store. So I wonder how to upload a backup manually. Any help? I use the newest cubecart version. Would be fine if someone could help it out. so that we don't need to rebuild it all again. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 27, 2016 Share Posted June 27, 2016 Welcome nagashiwa! Glad to see you made it to the forums. The SQL file that the backup generates can be used to recreate the database. What it cannot do is recreate the user accounts managed by the database server. User accounts are generally provided to you via your hosting account's control panel. The database account user/pass is then entered into the /includes/global.inc.php file. (A sample file, global.inc.php-dist, contains the variables to hold the data). During the process of freshly installing CubeCart, as best I can tell, there does not include the opportunity to restore the database from that backup. Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 27, 2016 Author Share Posted June 27, 2016 Huh? So if you want to switch your host. you cannot take your database with you? So that you need to rebuild your store from the beginning again? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 27, 2016 Share Posted June 27, 2016 I've never used the sql to restore a website from a backup - but NO - you do NOT lose your website if you change hosts, as long as you have a good backup. It's the database USER ACCOUNT that you have to know the login/password to. They have to be added to the global.include.php file - so CC knows how to talk to the database. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 28, 2016 Share Posted June 28, 2016 I would even hazard a guess that the hosting account's control panel has the means to rebuild a database from the SQL file generated by CubeCart. If not that, then certainly phpMyAdmin will rebuild the database from the SQL file. I think we need to clarify what is meant by "if I do upload the sql file with phpMyAdmin its somehow NOT linked at all to the store." I conclude you did have phpMyAdmin recreate the CubeCart database at your new host. What remains is to configure the global.inc.php file so that CubeCart (installed at your new host) knows where it is, what it is named, and the user/pass to access it. Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 28, 2016 Author Share Posted June 28, 2016 yeah but what exactly should I edit inside that global.include.php ? What do I need to edit? I did check up tutorials but all are from lower Versions. nothing for the ver.6 So what should I configure in the global.include.php ? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 28, 2016 Share Posted June 28, 2016 This is from the EXAMPLE global.include.php-dist file: <?php /**  * CubeCart v6  * ========================================  * CubeCart is a registered trade mark of CubeCart Limited  * Copyright CubeCart Limited 2014. All rights reserved.  * UK Private Limited Company No. 5323904  * ========================================  * Web:  http://www.cubecart.com  * Email: [email protected]  * License: GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html  */ $glob['dbdatabase']    = '';         // e.g. cubecart $glob['dbhost']       = '';         // e.g. localhost (Can be domain or ip address) $glob['dbprefix']       = '';         // e.g. store_1_ prefixed on to table names $glob['dbusername']    = '';         // username that has access to the db $glob['dbpassword']    = '';         // password for username $glob['installed']       = '0';         // set to 1 if store is installed $glob['adminFolder']    = 'admin';      // Change this if you have changed the admin folder name $glob['adminFile']       = 'admin.php';   // Change this if you have changed the admin file name $glob['cache']       = 'file';   // Cache in use can be (apc, file, memcache, memcached, xcache)  For the simplest situation - you would not have a prefix or have changed the admin naming, and you may not be using memcache (host will know) - so it might be file. ?> Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 28, 2016 Author Share Posted June 28, 2016 That's the thing this all isn't inside at all.  $glob['dbhost']       = '';         // e.g. localhost (Can be domain or ip address) $glob['dbprefix']       = '';         // e.g. store_1_ prefixed on to table names $glob['dbusername']    = '';         // username that has access to the db $glob['dbpassword']    = '';         // password for username $glob['installed']       = '0';         // set to 1 if store is installed $glob['adminFolder']    = 'admin';      // Change this if you have changed the admin folder name $glob['adminFile']       = 'admin.php';   // Change this if you have changed the admin file name $glob['cache']       = 'file';   // Cache in use can be (apc, file, memcache, memcached, xcache)  Oh wait I did got the wrong file Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 28, 2016 Author Share Posted June 28, 2016 I did try but I don't get what to edit to this : $glob['dbprefix']       = '';         // e.g. store_1_ prefixed on to table names  also maybe $glob['cache']       = 'file';   // Cache in use can be (apc, file, memcache, memcached, xcache) 'file' I think its not the righ tnow   whatever I try it doesn't work. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 28, 2016 Share Posted June 28, 2016 My database tables begin CubeCart_ If yours does as well, you don't have a prefix. If your table names begin with something before CUbeCart_ that's the prefix you need to add to global.include.php. The one I gave you is the EXAMPLE. You will make your edits to global.include.php. Your host will know which one for the cache. I'm not sure if you can just leave off the $glob['cache'] line and let CC figure that out or not. But since you're not getting into CC as it is, I don't guess it could hurt to try leaving that line off until you hear back from your host. Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 28, 2016 Author Share Posted June 28, 2016 mm.. it seems it doesn't want to change the table. If I check global.inc.php it didn't change into the one I edited in the global.inc.php-dist file. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 28, 2016 Share Posted June 28, 2016 You have to change the permissions on global.inc.php before you can edit it and save. After you change the permission, edit and save, be sure to put it back to 444. Sorry, forgot about that - it's been a long time since I made any edits there. Quote Link to comment Share on other sites More sharing options...
nagashiwa Posted June 28, 2016 Author Share Posted June 28, 2016 Ahh there we go.. after some failing tries *(^0^)* Good now I know how to restore it on the real server later again too. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 28, 2016 Share Posted June 28, 2016 YEAH!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.