yourwebhoster Posted May 30, 2012 Share Posted May 30, 2012 Hello A client of us has made a backup of his lost database with Prestashop. When I try to restore the backup I get this: #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 '‹' at line 1 How can I restore the prestashop backup? The method that is shown on the backup page in Prestashop tells me this: How-to restore a database Backup in 10 easy steps Turn off the "Enable Shop" option in the "Preferences" tab. Download the Backup from the list below or from your FTP server (in the folder "admin/backups"). Check the Backup integrity: look for errors, incomplete file. Verify all your data. Ask your hosting provider for a "phpMyAdmin" access to your database Connect to "phpMyAdmin" and select your current database Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database. At the top of the screen select the tab "Import" Click on the "Browse..." button and select the Backup file from your hard drive Check the max. allowed filesize (ie. Max: 16Mb) If your Backup file exceeds this limit, contact your hosting provider Click on the "Go" button and wait during the import, the process can take several minutes I've done this but it doesn't work. I've attached some demo data, how do you guys restore a backup? 1338403868-250d49c9.sql.gz Link to comment Share on other sites More sharing options...
shacker Posted May 31, 2012 Share Posted May 31, 2012 i check and seems the database backup is broken Link to comment Share on other sites More sharing options...
yourwebhoster Posted May 31, 2012 Author Share Posted May 31, 2012 i check and seems the database backup is broken This is the default output from a prestashop with the backup feature. How can we fix this? This is from a fresh Prestashop installation, should we do anything special to make this feature work? Link to comment Share on other sites More sharing options...
shacker Posted May 31, 2012 Share Posted May 31, 2012 a SQL backup is a text file, so you can open with notepad and read the content, but you file is unreadable Link to comment Share on other sites More sharing options...
yourwebhoster Posted May 31, 2012 Author Share Posted May 31, 2012 a SQL backup is a text file, so you can open with notepad and read the content, but you file is unreadable I'm aware about that but this is the output from two different prestashop installations by using the backup button. I'm wondering what can cause that the output is unreadable? Link to comment Share on other sites More sharing options...
shacker Posted May 31, 2012 Share Posted May 31, 2012 a normal backup must be like this /* Backup for localhost/prestashop482/ * at 1338466083 */ SET NAMES 'utf8'; /* Scheme for table ps_access */ DROP TABLE IF EXISTS `ps_access`; CREATE TABLE `ps_access` ( `id_profile` int(10) unsigned NOT NULL, `id_tab` int(10) unsigned NOT NULL, `view` int(11) NOT NULL, `add` int(11) NOT NULL, `edit` int(11) NOT NULL, `delete` int(11) NOT NULL, PRIMARY KEY (`id_profile`,`id_tab`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `ps_access` VALUES ('1','1','1','1','1','1'), ('1','2','1','1','1','1'), ('1','3','1','1','1','1'), ('1','4','1','1','1','1'), ('1','5','1','1','1','1'), ('1','6','1','1','1','1'), ('1','7','1','1','1','1'), ('1','8','1','1','1','1'), ('1','9','1','1','1','1'), ('1','10','1','1','1','1'), ('1','11','1','1','1','1'), ('1','12','1','1','1','1'), ('1','13','1','1','1','1'), ('1','14','1','1','1','1'), ('1','15','1','1','1','1'), ('1','16','1','1','1','1'), ('1','17','1','1','1','1'), ('1','18','1','1','1','1'), ('1','19','1','1','1','1'), ('1','20','1','1','1','1'), ('1','21','1','1','1','1'), ('1','22','1','1','1','1'), ('1','23','1','1','1','1'), ('1','24','1','1','1','1'), ('1','26','1','1','1','1'), ('1','27','1','1','1','1'), ('1','28','1','1','1','1'), ('1','29','1','1','1','1'), ('1','30','1','1','1','1'), ('1','31','1','1','1','1'), ('1','32','1','1','1','1'), ('1','33','1','1','1','1'), ('1','34','1','1','1','1'), ('1','35','1','1','1','1'), ('1','36','1','1','1','1'), ('1','37','1','1','1','1'), ('1','38','1','1','1','1'), ('1','39','1','1','1','1'), ('1','40','1','1','1','1'), ('1','41','1','1','1','1'), ('1','42','1','1','1','1'), ('1','43','1','1','1','1'), ('1','44','1','1','1','1'), ('1','46','1','1','1','1'), ('1','47','1','1','1','1'), ('1','48','1','1','1','1'), ('1','49','1','1','1','1'), ('1','51','1','1','1','1'), ('1','52','1','1','1','1'), ('1','53','1','1','1','1'), ('1','54','1','1','1','1'), ('1','55','1','1','1','1'), ('1','56','1','1','1','1'), ('1','57','1','1','1','1'), ('1','58','1','1','1','1'), ('1','59','1','1','1','1'), ('1','60','1','1','1','1'), ('1','61','1','1','1','1'), ('1','62','1','1','1','1'), ('1','63','1','1','1','1'), ('1','64','1','1','1','1'), ('1','65','1','1','1','1'), ('1','66','1','1','1','1'), ('1','67','1','1','1','1'), ('1','68','1','1','1','1'), ('1','69','1','1','1','1'), ('1','70','1','1','1','1'), ('1','71','1','1','1','1'), ('1','72','1','1','1','1'), ('1','73','1','1','1','1'), ('1','80','1','1','1','1'), ('1','81','1','1','1','1'), ('1','82','1','1','1','1'), ('1','83','1','1','1','1'), ('1','84','1','1','1','1'), ('1','85','1','1','1','1'), ('1','86','1','1','1','1'), ('1','87','1','1','1','1'), ('1','88','1','1','1','1'), ('2','1','1','1','1','1'), ('2','2','1','1','1','1'), ('2','3','1','1','1','1'), ('2','4','0','0','0','0'), ('2','5','1','1','1','1'), ('2','6','0','0','0','0'), What version of presta you have? Link to comment Share on other sites More sharing options...
yourwebhoster Posted May 31, 2012 Author Share Posted May 31, 2012 a normal backup must be like this /* Backup for localhost/prestashop482/ * at 1338466083 */ SET NAMES 'utf8'; /* Scheme for table ps_access */ DROP TABLE IF EXISTS `ps_access`; CREATE TABLE `ps_access` ( `id_profile` int(10) unsigned NOT NULL, `id_tab` int(10) unsigned NOT NULL, `view` int(11) NOT NULL, `add` int(11) NOT NULL, `edit` int(11) NOT NULL, `delete` int(11) NOT NULL, PRIMARY KEY (`id_profile`,`id_tab`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `ps_access` VALUES ('1','1','1','1','1','1'), ('1','2','1','1','1','1'), ('1','3','1','1','1','1'), ('1','4','1','1','1','1'), ('1','5','1','1','1','1'), ('1','6','1','1','1','1'), ('1','7','1','1','1','1'), ('1','8','1','1','1','1'), ('1','9','1','1','1','1'), ('1','10','1','1','1','1'), ('1','11','1','1','1','1'), ('1','12','1','1','1','1'), ('1','13','1','1','1','1'), ('1','14','1','1','1','1'), ('1','15','1','1','1','1'), ('1','16','1','1','1','1'), ('1','17','1','1','1','1'), ('1','18','1','1','1','1'), ('1','19','1','1','1','1'), ('1','20','1','1','1','1'), ('1','21','1','1','1','1'), ('1','22','1','1','1','1'), ('1','23','1','1','1','1'), ('1','24','1','1','1','1'), ('1','26','1','1','1','1'), ('1','27','1','1','1','1'), ('1','28','1','1','1','1'), ('1','29','1','1','1','1'), ('1','30','1','1','1','1'), ('1','31','1','1','1','1'), ('1','32','1','1','1','1'), ('1','33','1','1','1','1'), ('1','34','1','1','1','1'), ('1','35','1','1','1','1'), ('1','36','1','1','1','1'), ('1','37','1','1','1','1'), ('1','38','1','1','1','1'), ('1','39','1','1','1','1'), ('1','40','1','1','1','1'), ('1','41','1','1','1','1'), ('1','42','1','1','1','1'), ('1','43','1','1','1','1'), ('1','44','1','1','1','1'), ('1','46','1','1','1','1'), ('1','47','1','1','1','1'), ('1','48','1','1','1','1'), ('1','49','1','1','1','1'), ('1','51','1','1','1','1'), ('1','52','1','1','1','1'), ('1','53','1','1','1','1'), ('1','54','1','1','1','1'), ('1','55','1','1','1','1'), ('1','56','1','1','1','1'), ('1','57','1','1','1','1'), ('1','58','1','1','1','1'), ('1','59','1','1','1','1'), ('1','60','1','1','1','1'), ('1','61','1','1','1','1'), ('1','62','1','1','1','1'), ('1','63','1','1','1','1'), ('1','64','1','1','1','1'), ('1','65','1','1','1','1'), ('1','66','1','1','1','1'), ('1','67','1','1','1','1'), ('1','68','1','1','1','1'), ('1','69','1','1','1','1'), ('1','70','1','1','1','1'), ('1','71','1','1','1','1'), ('1','72','1','1','1','1'), ('1','73','1','1','1','1'), ('1','80','1','1','1','1'), ('1','81','1','1','1','1'), ('1','82','1','1','1','1'), ('1','83','1','1','1','1'), ('1','84','1','1','1','1'), ('1','85','1','1','1','1'), ('1','86','1','1','1','1'), ('1','87','1','1','1','1'), ('1','88','1','1','1','1'), ('2','1','1','1','1','1'), ('2','2','1','1','1','1'), ('2','3','1','1','1','1'), ('2','4','0','0','0','0'), ('2','5','1','1','1','1'), ('2','6','0','0','0','0'), What version of presta you have? I'm aware how a sql should look like, but I need to know why prestashop gives this output. The sample backup is from a fresh install with version 1.4.8.2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now