4

I have a rather large set of attributes and a dozen attribute sets that I need to migrate to a fresh installation of Magento of the same version down the road. I'd like to do this without carrying over the attribute values theselves.

Has anyone done this safely? I have exported-imported the eav_* and catalog_eav_attribute in the past to move all attribute-related data while testing some things, and it seemed to have work without problems that I could notice. But what if I want to just perfectly copy over attributes, attribute sets, and no attribute values that are new to the fresh installation (i.e. no products)?

  • did you ever complete this? I would be interested if you had any issues. – David Manners May 20 '14 at 9:12
  • I had tried copying the tables at first, and it seemed to be fine. However, I quickly decided to just write a Magento shell script to recreate the attributes and sets in order to avoid any problems down the road. – musicliftsme May 21 '14 at 0:22
  • 2
    feel free to post how you did this as an answer to your question. – David Manners May 21 '14 at 6:54
4

I also had to deal with this kind of issue once.

Possible ways of migrating the attributes and attribute-sets to a fresh (!!) installation:

Copying tables to the new database

As the OP already already mentioned, copying the eav_* and catalog_eav_attribute is a possible option.

Creating setup scripts to execute on the new installation

This is the best-practise way in this case. The OP mentioned Magento shell scripts above, but I guess Magento setup/data scripts where meant. Create a new module, add a setup or a data resource and add your script(s) which contain the code to generate your attributes and attribute sets.

You can have a look at the eav_setup and catalog_setup how Magento sets up the default attributes & attribute sets.

Use SOAP

If you don't have/cannot get access to the second magento installation, you could think about writing a SOAP-script to retrieve the attributes and attribute-sets. This is not the fastest option of all, but still a possibility. Be aware that the functions of the SOAP API is limited.

Personal note: I think I can remember that I have encountered some issues with the attribute groups, so you might need to extend the SOAP functions at least a bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.