Jump to content

How to Backup and Restore Customers and Orders help?


Recommended Posts

Hello everyone, i need to make a fresh install of my prestashop but i want to backup and restore the folowing informations / tables:

 

Full customers accounts

Full Orders details

Full catalog = Categories and Products.

 

I know some about mysql and i think i can do it all if someone help me with the tables i need to backup and restore.

Or maybe there is an easy tool to do it.

Thouse are the biggest needs i have, all the rest such as template and other info i can put it back again.

 

EDIT: My actual prestashop is 1.4.9.0 the fresh installation will be to 1.4.11.0 and no, i dont want to use 1-click upgrade because i need a fresh DataBase working because my actual bd is having some problems tracking refferers and some information is missing on orders page since paypal module update.

 

 

Best Regards to all

Edited by PC33 (see edit history)
Link to comment
Share on other sites

Hi,

 

go to your MYSQL client (I suppose it's Phpmyamdin) select the database and in the left part, there should be check buttons. Check (better everything) that starts with PREFIX_Customer_XXX, PREFIX_Orders_XXX and also PREFIX_ADDRESSES_XX! - Those are the three tables you'll need to export. Also maybe prefix_carts.

 

For categories and products - export prefix_categories_XXX and prefix_products_XXX. For the images of products - you'll need table prefix_images_xxx.

 

When you check all the checkboxes scroll down, there should be a scroll-list from which you should choose Export.

You'll be directed to next page, where you choose SQL and press the Export button.

 

I HIGHLY RECOMMEND TO FIRST BACKUP THE WHOLE DATABSE! I MIGHT HAVE FORGOTTEN A TABLE AND THAT WOULD MAKE A BIG MESS IN YOUR NEW SHOP.

 

For import, all those tables that you exported must be empty! Then you just select new database, import, select the SQL file and voila!

  • Like 1
Link to comment
Share on other sites

PC33:

 

There are also other tables too! This was just a simple export, I didn't mention attributes, attachments, accessories, etc..

This really depends individually on your own shop.

I would recommend looking on the database structure, where everything is linked nicely sou you'll understand it rly easyli.

http://www.daveegerton.com/assets/images/database-schema-prestashop.png

Link to comment
Share on other sites

  • 7 months later...

And what about the databese exporter included in prestashop 1.5? Is it any good? I just want the same thing as PC33. I found the information on restoring the database in the prestashop manual, but it is a bit confusing.

 

Using phpMyAdmin

If you prefer to trust phpMyAdmin's backup feature rather than PrestaShop's tool, you can! Here is the process to follow:

  1. Log into phpMyAdmin on your web server.
  2. From the main login screen, select "Databases".
  3. Click the name of PrestaShop's database to open it.
  4. In the database screen, click the "Export" tab on the top set of tabs.
  5. In the export screen:
    1. Make sure all of PrestaShop's tables are selected, and only these. They should start with the ps_ prefix (or any prefix you have chosen to use when installing PrestaShop).
    2. Make sure the "SQL" radio button is selected.
    3. In the "Structure" section, tick the following boxes:
      • "Structure".
      • "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION".
      • "Add IF NOT EXISTS".
      • "Add AUTO_INCREMENT".
      • "Enclose table and field names with backquotes".
    4. In the "Data" section, tick at least the following box:
      • "Data".
    5. In the "Save as file" section:
      • Tick "Save as file".
      • Leave the template alone (usually, "__DB__").
      • Tick the "zipped" or "gzipped" box, in order to compress the file before downloading it.
    6. Click the "Go" button.
  6. The browser should start downloading the data file. Save that file in your computer's backup folder.

If your server is too weak to let you export all your tables at once, break down your backup in several files. For instance, choose the first 20 ps_ data tables and export those, indicating clearly in the file name that it is the first of several. Once theses tables are backed up and safe on your computer, do the same for the next 20 tables, and so on, not forgetting to indicate their position in the file name.

 

Restoring your data

The process described here uses phpMyAdmin, which is a standard web tool. If you web host makes you use another tool for managing your databases, you will have to adapt this process to that tool. Check your webhost's documentation on the matter.

The data restoration process is as easy as the one you would follow when backing up data:

  1. Log into phpMyAdmin on your web server.
  2. From the main login screen, select "Databases".
  3. Click the name of PrestaShop's database to open.
  4. In the database screen, click the "Import" tab on the top set of tabs.
  5. In the import screen:
    1. In the "File to import" section, click the "Browse..." button and find your backup file from your data. It can be either the raw SQL text file (.sql), or a compressed version of it (.sql.zip, .sql.gzip, .sql.tar.gz, etc.).
    2. In the "Format" section, make sure the "SQL" format is selected.
    3. Click the "Go" button.
  6. The browser should start uploading the backup file.

If you have more than one backup data file, import them one after the other.

Link to comment
Share on other sites

×
×
  • Create New...