Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how can i reload the original database back into sql


Guest

Recommended Posts

I believe you are mixing things a little

 

1) Files, do not contain any data, except of text etc, also image files can be considered as "data" in your meaning. Files are mainly responsible for the functionality and the display. You can do a backup of them (you need to make a copy and store this copy on your computer), and restore them by reuploading them to he server. There is a also a contribution for backing up the files

 

2) The data (such as product descriptions etc) is in the database, not in the files. There are various ways to backup and restore a backup. You can do it via your admin panel (tools>database backup>restore) or via your host cpanel (must be a button somewhere) or via your phpMyAdmin (import>select the database.sql file>go)

 

The point is that you need to have a backup to install. If you don't have, then, installing a blank database will give you an empty store, no customers (only John Doe) and only the default sample products

 

Maybe you explain a little more what your issue is?

Link to comment
Share on other sites

well what i did was i tried adding the whos online contrib 3.6.5 i allready had 3.6.3 installed and somehow when i did this it made my site go down and i havnt got it back up yet. one of the things it said to do was add a sql to my database i thought i had it backed up but i do not i do however have the data that was in the database backed up just not the sql database itself that was my flaw in my plan well anyway i added the sql part of the contrib and it came back with an error didnt really think much about it because the error was this item allready existed in table so i continoued on with the upgrade well it didnt work so i deleted the who_is portion of the database table thinking i would use the sql portion of the contrib to replace it well that was a mistake too because the thing in the contrip is a modification not a add too so now i get the error the whos_online doesnt exist well i then tried to put the database back on with my back up and that is when i realized that is just a back up of the data on the table not a back up of the table itself so what i really need to do is add the whos_online section of my database back so i can try and repair my site and get it back up thanks for help my site has been down now for almost 24 hours and i am starting to panic

Link to comment
Share on other sites

the only back up i have is the one that in side the admin side of the web site were you can back up the database i believe this not to be a back up of the database table just a back up of the data that was in the table so i guess the anser is no i do not have a back up of the database table alltho i have been in contact with the company that host's my site and supposedly they make a back up of my intire site database and site and i have requested that they do a complete restore but that has not happend yet either

Link to comment
Share on other sites

i do have ( somewere ) the original database table that was used to creat it when i installed os commerce alltho what i would like to do instead of making a whole brand new table then trying to add all the addons i put there then put in the data that i do have backed up is just put in the section whos_online back into the database table any hope in doing that ?

Link to comment
Share on other sites

If you have a backup of the data but not the table structure it should be possible to import the data from the backup but it will fail at the point where a table that doesn't exist, or a field that doesn't exist in a table, is encountered. You will have to create the missing table(s) first. If it's only one table that you've deleted you could recreate it just by running the part from the original oscommerce sql file that creates it. If a contribution added any fields to it you would also have to run the part of the sql statement in the addon that creates the field, or create it manually using phpadmin or some such, if you know the name and type etc.

 

.. If you have data that can be imported, and the rest of the data in all the other tables is ok, and the problem is just over one table, then you should only need to recreate that table and import only the data for that table...

www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used!

Link to comment
Share on other sites

ok that seems to be my problem i did only remove the one thing ( whos_online ) i do not know how to recreate that section of the database table can someone please explain that process to me i do have phpadmin in cpanel on the web server

Link to comment
Share on other sites

First look through the sql statement used by osc when it's installed. You can open it with any text editor. Then look for the part where it says DROP the whos_online table if it exists and then CREATE it, followed by the adding the names of the fields in the table and any indexes. You can just copy that section of the sql statement and run it in phpadmin. Then do the same for the contribution - copy the part of the sql statement provided in the contribution that ALTERs the table and run that in phpadmin. Finally look through the backup file, assuming that is also an sql statement, and copy the section that holds the rows for the whos_online table - it will be clear which table each line is about, then import that data only back into the whos_online table.

www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...