How to keep products synchronized in two shops

(Reading the comments, it seems that you're trying to create a way to easily and reliably synchronize your production database to your staging site. Perhaps you could update the question to make this more clear.)

This is a common problem and having a tool to do this reliably is really beneficial. I have written my own bash script to do it and this is the basic process you should be trying to replicate:

  1. Dump the production database to a gzip tarball
  2. Download the dumped tarball to your staging server
  3. Drop and recreate the staging DB
  4. Import the production dump into the staging DB
  5. Adjust any configuration as appropriate for your staging server (mainly changes in core_config_data such as web/unsecure/base_url and web/secure/base_url etc)

I would suggest as a first step to get this down to a set of commands that you can reliably run to give you the desired result. Then once you have the process refined you can think about automating it with a simple script.

The tool that is really going to help you here is n98-magerun which is a priceless CLI tool for the Magento developer.

Breaking down the steps above into n98-magerun commands:

1) Dump the production database to a gzip tarball

On your production server:

n98-magerun db:dump -c "gzip" ~/latest-production-db.sql.gz;

Consider also using the --strip option to remove sensitive data such as customer and order records. Depends on your use-case. See n98-magerun docs for Stripped Database Dumps.

2) Download the dumped tarball to your staging server

On your staging server:

Use rsync or scp or whatever CLI tool is most convenient or familiar to download the tarball created above.

Example using scp:

scp user@production:~/latest-production-db.sql.gz ~/latest-production-db.sql.gz

3) Drop and recreate the staging DB

On your staging server:

n98-magerun db:drop && n98-magerun db:create

4) Import the production dump into the staging DB

On your staging server:

n98-magerun db:import -c "gzip" ~/latest-production-db.sql.gz

5) Adjust any configuration as appropriate for your staging server

On your staging server:

n98-magerun config:set web/secure/base_url https://staging.domain.tld/
n98-magerun config:set web/unsecure/base_url https://staging.domain.tld/

Use the same config:set command for any other configs that need setting. Note that config:set can be scoped to a store or view. See the n98-magerun readme. Once you start to automate this process I highly recommend the HarrisStreet-ImpEx module for n98-magerun for managing your environment configs.


We've got a similar setup and scenario. We went with a database level sync of product based tables. It works by dumping and importing tables.

The copy site is down for about 15 mins in early hours.

It was trial and error over which tables to sync.

Watch for eav tables though. There is a table which stores increment ids for orders, invoices etc. You dont want to sync this.

It was a very bespoke scenario and that worked for us. That's about as much info as I can give you at this stage. Good luck.


not sure how your copy store works, but you can use many options:

  1. Magento Sync Products paid extension
  2. Odoo connector Example free connector/ Odoo bridge Example Webkul paid extension
  3. Magmi Magento Mass Importer
  4. Store manager for magento
  5. Magento Dataflow