Jump to content

Can't restore a backup


Recommended Posts

I backed up a db using the back shop's tools -> backup option. Then on a new ps install, and on a new db, I selected Preferences -> shop offline, then went to the tools -> import option. Selected the file, and I got "successfully uploaded", but nothing seems to have changed... The only products in the catalogue are the sample ones. Tried with both the compressed backup file (.sql.bz2) and that one uncompressed (.sql)

 

On another try, I did another backup with phpMyAdmin itself. A new ps install, new db, then imported the generated .sql (which included statements to drop existing tables). All the products and such appeared there, checked by looking at ps_product_lang et cetera, and they also did appear in the shop itself (without pictures because I forgot them)... but then I can't login to the new shop's back office, even if I used the same email and password :C

Link to comment
Share on other sites

I backed up a db using the back shop's tools -> backup option. Then on a new ps install, and on a new db, I selected Preferences -> shop offline, then went to the tools -> import option

 

you cannot use the backup file generated in the Tools | DB Backup section, in the Tools | import section. They are completely different.

 

You can use the backup file generated in the Tools | DB Backup section, to import into phpmyadmin as per the instructions in the Tools | DB Backup section.

 

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

Link to comment
Share on other sites

  • At the top of the screen select the tab "Import"

Ah, I had understood this as meaning the tab Import at the top of the screen in the back office, rather than phpMyAdmin. However, I then exported via back office, installed a new shop with same info except new database, and imported via phpMyAdmin, which did not work properly for me.

 

Same as before happened: the products and such were fine from the store page itself (sans images, which was expected), but I couldn't log in to the back office. And all the data from the install was double-checked to be exactly the same, email and password. I assumed the problem would lie around the fact that, even if the password input by the user is the same on both installs, the password field stored in the db may be different, what with encryption my understanding is quite short.

 

So what I did was:

  1. Backup old shop either via back office tools or phpMyAdmin itself
  2. Install new shop on a different, new database
  3. Go into the new shop's db in phpMyAdmin. Backup/export only the ps_employee table, which seemed to contain the login info
  4. Import the old shop's file into the new db, via phpMyAdmin. Before that, you might have to delete all tables if you hadn't included DROP TABLE statements in step 1
  5. Import the same way the recently backed up ps_employee table into the new db

This allowed me to log in to the new back office. Maybe a bit roundabout of a way but it sure was a relief.

Link to comment
Share on other sites

2. Install new shop on a different, new database

Perhaps this is the problem step. When you export a database, you are not supposed to run the install program and then import.

 

I'm not entirely sure what you are trying to accomplish, perhaps if you explain what you are trying to do, it will help. If you are simply trying to ensure that you can recover from a backup, then you are not doing it properly.

Link to comment
Share on other sites

Now on that regard, what would be the least roundabout way to keep/restore the products' images? In my case, I was working in localhost so the folders they were originally from hadn't even changed

Just backup the img/p folder. In fact you should be backing up your entire root folder on a routine basis.

Link to comment
Share on other sites

Perhaps this is the problem step. When you export a database, you are not supposed to run the install program and then import.

 

I'm not entirely sure what you are trying to accomplish, perhaps if you explain what you are trying to do, it will help. If you are simply trying to ensure that you can recover from a backup, then you are not doing it properly.

I was testing different themes, settings, styles and such in different ps installs on localhost. As part of the test, I wanted to know if I could easily transfer all products etc I had added in one shop to another, "empty" shop. Then this wasn't the way to do so?

Link to comment
Share on other sites

no, using the database backup tool would be for restoring your entire site to a replica of the site.

 

I'm not aware of a prestashop component that would allow you to export store (customer, order, product) information for use in a separate store using the import csv component.

 

you could try exporting specific tables into a csv file from phpmyadmin, and then use that csv file to import into the back office of a different shop. there are also likely modules on the addon store that already do this.

Link to comment
Share on other sites

  • 4 months later...

you cannot use the backup file generated in the Tools | DB Backup section, in the Tools | import section. They are completely different.

 

You can use the backup file generated in the Tools | DB Backup section, to import into phpmyadmin as per the instructions in the Tools | DB Backup section.

 

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

 

My hosting has all my backup files from Prestashop. I accidentally erased the products so I told them to overwrite my files to the ones on the backup. Even after doing that, I still can't see my products in my backoffice.

 

What can I do?

Link to comment
Share on other sites

Have them restore you sql database

 

I told them to restore the sql database from the day before I erased the products (because all the products were duplicated and when I erased the duplicated ones, everything dissappeared) and I still can't see my products in my backoffice. Do I have to upload the sql file to prestashop or something?

 

The files are all in my server.. So I don't get why I can't see them..

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...