IndiaStarker Posted September 12, 2005 Share Posted September 12, 2005 Summary: Don't see anything restored when tried to restore from sql file. Is it a bug or am I doing it wrong? Hi, reposting here in installation/config because perhaps gerneral support is the wrong place ? Simplified: When I try to restore an sql file created by backup==>Download only, I get nothing. When I copy this same file to the backups directory, it restores fine. Can anyone explain this? Thanks! India **************************************************** DETAILS The symptoms (machine details at end of post) 1. From a clean unmodified store (MS2 vanilla) created 2 customers, STARKER, Sartre and left Doe there. 2. In admin, Chose Tools==>Database Backup Checked Download only 3. Pressed button backup. So far so good. I see on my local hard disk a file ending in .sql :thumbsup: I look in there, not that I can read sql, but it looks like it restoring would probably erase my address book and put back Doe, STARKER and Sartre. Now still in admin under Customers, I delete my 3 customers (Doe, STARKER and Sartre). Now in Database Backup Manager, I choose restore and then Browse... I choose the saved sql file from my hard disk. I press the restore button. I see Sending request to... Waiting for... Transferring Done (at bottom of window). But Customers shows no customers ! I am not on a secure HTTPS connection. I repeated the experiment several times both locally and on my ISP's machine with the same results. Thanksin advance for any info. I searched the forums for at least a half-hour for various combinations of "database restore" "raw sql" and "Database Backup Manager" but didn't turn up anything. I also checked the bug database for "Database Backup Manager" and didn't find anything. ******************************************************************************** More specific details here: ******************************************************************************** Here is the path (just for the example) as shown in the input box left of Browse /home/india/Desktop/db_db136524492-20050912151311.sql Here is the beginning of the file (although this is probably not necessary) : # osCommerce, Open Source E-Commerce Solutions # http://www.oscommerce.com # # Database Backup For osCommerce # Copyright (c) 2005 Harald Ponce de Leon # # Database: db136524492 # Database Server: db193.unetun.com # # Backup Date: 09/12/2005 15:13:11 drop table if exists address_book; create table address_book ( address_book_id int(11) not null auto_increment, customers_id int(11) default '0' not null , entry_gender char(1) not null , entry_company varchar(32) , entry_firstname varchar(32) not null , entry_lastname varchar(32) not null , entry_street_address varchar(64) not null , entry_suburb varchar(32) , entry_postcode varchar(10) not null , entry_city varchar(32) not null , entry_state varchar(32) , entry_country_id int(11) default '0' not null , entry_zone_id int(11) default '0' not null , PRIMARY KEY (address_book_id), KEY idx_address_book_customers_id (customers_id) ); insert into address_book (address_book_id, customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('1', '1', 'm', 'ACME Inc.', 'John', 'Doe', '1 Way Street', '', '12345', 'NeverNever', '', '223', '12'); insert into address_book (address_book_id, customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('2', '2', 'f', 'LJP', 'India', 'STARKER', '15 rue R?aumur', '', '75003', 'Paris', 'Ile de France', '73', '0'); insert into address_book (address_book_id, customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('3', '3', 'm', '', 'Jean Paul', 'Sartre', '213 rue R?aumur', '', '75011', 'Paris', 'IDF', '73', '0'); drop table if exists address_format; create table address_format ( address_format_id int(11) not null auto_increment, address_format varchar(128) not null , address_summary varchar(48) not null , PRIMARY KEY (address_format_id) ); *************************************************************************** My environment details: *************************************************************************** I just installed a clean MS2 french (from oscommerce-fr.info) I tried this experiment on my local machine (Fedora3) running: APACHE server : 2.0.54 mysql : 4.1.13 php : 4.4.0 register_globals On and on the server from my hosting company 1and1: APACHE server : 1.3.33 mysql : 4.0.25 php : 4.3.10 register_globals On with identical results (well almost identical). Only differences are: 1. On my local machine I get an extra backup choice: use GZIP (which worked fine) 2. Also on my local machine, if I delete all the customers I get an sql error (don't much care about this) but here it is: Customers Search: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by c.customers_lastname, c.customers_firstname limit -20, 20 [TEP STOP] Thanks again for any insight or pointers to documentation. India *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression. Link to comment Share on other sites More sharing options...
♥Vger Posted September 12, 2005 Share Posted September 12, 2005 Access your database via phpMyAdmin, click on the SQL tab, use the Browse function to locate the backup on your computer and then click the 'Go' button. For the 1064 error look below my name. Vger Link to comment Share on other sites More sharing options...
IndiaStarker Posted September 13, 2005 Author Share Posted September 13, 2005 Thanks Vger, If I understand what you are saying, it's use phpMyAdmin. Which implies Don't use Admin==>Tools==>Database Backup Manager, Restore==>Browse... Yet this feature to read from a file *is* there and doesn't appear to work. If so, this choice should be removed, no? Should I conclude that it's a bug? Should I submit the bug? Best regards, India Access your database via phpMyAdmin, click on the SQL tab, use the Browse function to locate the backup on your computer and then click the 'Go' button. For the 1064 error look below my name. Vger <{POST_SNAPBACK}> *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression. Link to comment Share on other sites More sharing options...
♥Vger Posted September 13, 2005 Share Posted September 13, 2005 It may be that it simply does not work on your system. I have to admit that I have never, in all my time with osCommerce, used this feature - preferring to use phpMyAdmin instead, or else to do a whole-site backup and restore if needed via the web hosting control panel. I wouldn't submit it as a bug until you check other bug reports to see if this has happened to anyone else. Vger Link to comment Share on other sites More sharing options...
IndiaStarker Posted September 13, 2005 Author Share Posted September 13, 2005 Wow that was a quick reply. Sorry I already submitted the bug. Since I tested it carefully several times on two different configurations (both via my remote hosting company and on my local machine) and the behavior was the same in all cases (no cutomers were restored, it smelled like a bug to me. I searched the bug database and did not find a case. My feeling is that like you, people are not using this feature. Probably anyone who did learned it didn't work and just went on. Actually I am trying to learn the *recommended* backup procedure before actually getting down to customizing my store. It's actually pretty hard to find out what the recommend prodedure is! Can we make a stickie on this? What is "web hosting control panel" ? Please please tell me if this is right : To backup, 1. First backup the sql database using <insert recommended tool here> 2. Then copy (/download/whatever) recursively the catalog directory e.g. under linux cp -r /some/path/catalog /some/backup/path Although it sounds simple I couldn't find this info anywhere. Please confirm or deny. Thanks in advance. India It may be that it simply does not work on your system. I have to admit that I have never, in all my time with osCommerce, used this feature - preferring to use phpMyAdmin instead, or else to do a whole-site backup and restore if needed via the web hosting control panel. I wouldn't submit it as a bug until you check other bug reports to see if this has happened to anyone else. Vger <{POST_SNAPBACK}> *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression. Link to comment Share on other sites More sharing options...
IndiaStarker Posted September 13, 2005 Author Share Posted September 13, 2005 Vger, I am really confused. You write or else as if backing up the site eliminates the need to backup the sql database. Is that true ? :blink: I think it would help a lot to understand what exactly is the relationship between the sql database and "the site". 1. When you say "the site" do you mean catalog/ and its contents? 2. Is there stuff in "the site" that is also redundantly contained in the sql database? If so, which one has priority? Pointers to documentation would be great. Thanks in advance, India ...preferring to use phpMyAdmin instead, or else to do a whole-site backup and restore if needed via the web hosting control panel.... Vger <{POST_SNAPBACK}> *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression. Link to comment Share on other sites More sharing options...
♥Vger Posted September 13, 2005 Share Posted September 13, 2005 'Whole site backup and restore', as I said, is part of the web hosting control panel (at least the one I use), and is not related directly to osCommerce. However it does allow you to backup all of the website, its database, files, folders, and everything held in the hosting control panel including password protected folders and e-mail addresses on the domain. Vger Link to comment Share on other sites More sharing options...
IndiaStarker Posted September 13, 2005 Author Share Posted September 13, 2005 ...Actually I am trying to learn the *recommended* backup procedure before actually getting down to customizing my store. It's actually pretty hard to find out what the recommend prodedure is! Can we make a stickie on this? ... <{POST_SNAPBACK}> Thanks very much to Vger for his timely help. Now I have a question for someone who does things in a more manual way since I may be stuck doing so. Is the following true or false ? For someone not using any special "backup entire site" tool, is this what you do ? 1. First backup the sql database using phpMyAdmin (apparently better than OsCommerce native Database Backup Manager) 2. Then copy (/download/whatever) recursively the catalog directory e.g. under linux cp -r /some/path/catalog /some/backup/path Could someone who actually does this and does not use their host's integrated tool (since I apparently don't have such a thing) please confirm or deny ? Related questions : Is there any relationship or dependency: database--catalog/ tree? In other words, is the catalog/ tree completely independant from the contents inside the current sql database or not? (Ignore the presence of the backups directory in your response) Should one always backup both and in what order? Background: (I just spoke to my provider 1and1.fr and they do provide phpMyAdmin but my interlocuteur did not know/think they provide any tool which backs up both sql databases and files. >_< Not a good sign (the not knowing part) but hey they do have phpMyAdmin in place ... So I really really need to know the procedure for a "semi-manual" backup or I have to switch providers ! Thanks in advance. India *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression. Link to comment Share on other sites More sharing options...
♥Vger Posted September 13, 2005 Share Posted September 13, 2005 Your 'catalog tree' is in the database. No database - no catalog. To take a backup of all files and folders download the 'catalog' folder, or if located in the root of your web all files and folders via FTP to your computer. Very few people download via command line using ssh or telnet. It doesn't matter which order you download in, provided that you have full up-to-date backups of both folders/files and database. Stickies are hardly ever used on these forums - alas! Vger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.