News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Migrating data from VM 1 to VM 2 ?

Started by iDanny, March 23, 2011, 03:10:07 AM

Previous topic - Next topic

iDanny

Hi,

is it safe to assume migration from VM1 to VM2 will be available (if it's not already) ?

Thanks,
Danny

jjk

#1
Currently it looks like official migration tools will not be available before the release VirtueMart 2.1. - because all participating developers are busy with other things.

However, it is possible to do it 'manually' any time. Last weekend I migrated 500 products from J1.5.22/VM1.7 to J.1.6.1/VM2Beta3 using a mixture of phpadmin, HeidiSQL and Notepad++. Basically what you have to do is exporting the database table columns holding your product data to sql files and importing them into the new version. Only one or two columns required a name change.

I used phpadmin to print the column headers into a text file in order to make it easier to compare the column headers with those used in VM2. For exporting the table columns into sql files I used HeidiSQL, because it is easy to select only the columns you actually need. After that I used Notepad++ to rename a few column headers to match those used in VM2 and finally imported the tables into VM2 using HeidiSQL again.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lindapowers

Understand thats not a solution for newbies o people without advanced programming knowledge...

anyway I was going to ask the same question, is good that there are plans for migration tools in the future, however although I understand they are busy when you create a new version and have an old one used by millions of users, migration should be considered as the first thing.


jjk

#3
Quote from: lindapowers on March 26, 2011, 23:31:01 PMUnderstand thats not a solution for newbies o people without advanced programming knowledge...

If you can handle Joomla/VirtueMart, you will also be able to handle SQL tools like phpadmin or HeidiSQL. All you have to do is to select the database columns you want to migrate, export them to a file and then import them again into the new VM2 database table. Not much different from using a text editor.

...I don't have any programming or SQL knowledge either. It was my first attempt to migrate MySQL database tables 'manually' and it turned out to be easy.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

xpozay

In order to make a decision on waiting for VM 2.1 (ie for the migration  tool) some information would be useful:
- How long after VM2 will be 2.1 (approx)
- What information will be migrated from VM 1 to Vm2.1

For example:
- product information
- shopper details
- past order details

Or from a user perspective
- Will a shopper be able to view his past orders combined with new orders?
- Will a shopper be able to edit and/or add to his past shipping and billing address?

For me, and perhaps many others.  Migrating / re-entering the product details manually is not that bad.  For me it's the shopper and order details that is troublesome.  For example, I have only ard 10 products but 10,000 orders about about 8000 shoppers.  This would be a nightmare to migrate.

Thanks

Chris

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

incolor

I've spent about an hour playing with the new VM1.9.8 migration tools on a J1.5.23/VM 1.1.9 installation.

I can get the Users to migrate fine.
Categories also seem to migrate.
Media says it migrated 599 items.
I have not had any success with the Products or Orders though.

Product migration shows this message: "Found 399 vm1 products to import; Migration: 0 products processed"
Orders migration just gives me a blank page.

I've tried doing each individually in addition to trying the Migrate Everything tool.

Also, my Orders page and Products page break, giving me only a blank screen on them.

incolor

I've been playing around with the VirtueMart 2 RC2 (1.9.8) migration tools, and it's not terribly clear what the suggested way to do the migration is. I've tried the migration a dozen times now, each on a fresh clone of my site. Every time, VirtueMart has broken.

It would be excellent if someone could write a little README.txt which gives a basic set of recommended steps for migrating data from VM1 to VM2. I suggest the following instructions/tips:

1) advance preparation, i.e.:
  a: should any modules or plugins be deactivated?
  b: should any data/files be located in special directories (besides those already indicated)?
2) the order to install component & module
3) what to try first
4) if that doesn't work, is it important to start over from a fresh copy? or can the migration tools be run again on the same installation
5) in what order should the individual migration tools should be run?

Again, I often find myself at a blank screen after running a tool. I have no idea where to go from there.

Milbo

Quote from: Art Fisher on July 15, 2011, 05:25:23 AM
Product migration shows this message: "Found 399 vm1 products to import; Migration: 0 products processed"
Orders migration just gives me a blank page.

I've tried doing each individually in addition to trying the Migrate Everything tool.

Also, my Orders page and Products page break, giving me only a blank screen on them.

Maybe there wasnt enough max execution time left, so the migrator stops. In this case, just hit the button again. The migration process should resume. You are right there should be more information. But answering questions is easier, then invent a readme text into the blue.  I will use this answers here to improve the help text.

answer to 1: The migrator does not look on plugins, components or modules. Afaik and imho you neednt todo anything here.

answer to 2: The best order is already used, when you use the button "Migrate everything we can from VM1 to VM2". It is just using all buttons from left to right. The sequel is media, shoppergroups, users, categories, manufacturerCategories, manufacturers, products, orders.

answer to 3: Exactly for your case and further investigation, we provided the buttons for the single steps. The products gets not imported? So maybe the first you should try is the migration of the products. It is automatically first porting the categories and manufacturer stuff, so that the products get already the new id for the categories and manufacturers.

answer to 4: No, definitly not. The tools provide already buttons for this. Use the "Remove Virtuemart Tables" to delete all user generated data, after that use one of the migrationtools. The migrator should be able to handle data which is already there. Because the migrator does not just copy the db data. The migrator gets the information of the old _vm_ tables and adds them to vm2 using the VM2 models. This means for exampel, when your old products used the ids from 100-500, they will have the ids 1-401 in VM2.

The button "Reset all tables and install sampledata" deletes ALL _virtuemart_ tables and reinstalls all tables and inserts the sampeldata. This is like a completly new install regarding the SQL. We used this for developing, in fact I didnt reinstalled VM2 for more than 6 months. The button "Restore System Defaults" is kind of the opposite of "Remove Virtuemart Tables". It reinstalles all VM2 information, which is normally not user generated, this are states, countries, currency, orderstatus, adminmenu,...

Very important! The migrator is resuming. This means the migrator stores the already ported data and does not import it twice. In theory you can press the buttons as often as you want.

The blank screen, uhh yes, this is nasty. Also a reason we provided not only one button. In your case it would be very interesting to know in which step you get the blank screen.

and here some information, what we already did with the migrator:
- Someone ported more than 2000 images to VM2 within a minute.
- Ported approximately 5000 users
- Ported approximately 6000 orders
- ported approximately 20 categories

known issues:
- we may get problem with more than 3000 products, cats, manufacturers. The reason is that maybe the serialized object gets too big, which gets stored in the db to store the progress. This is more theoretically and not confirmed. In your case, I dont see any problems, or do you have 3000 categories?
- the media synchronisation does not delete entries without file. Maybe it is better not to do that automatically, maybe it is better to add a button like "Delete media entries, without media"

Greets Max Milbers
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

franzpeter

In my case, it did migrate the customers, but no orders, products or categories. did try to single migrate order, but no success. So my question is (in case of orders): Does it need the suitable payment plugins to import orders? So if in VM 1.1.9 there is a payment plugin, which does not exist in VM 2.xx, does that prevent importing orders?

franzpeter

To figure out what may be wrong: I did install a complete new virtuemart 1.1.9 with the sample data and did install VM2. Seems that the whole migration thing is not working as it should. I was not able to even migrate the standard virtuemart sample data (products, categories) from the old brand new installed VM 1.1.9 to VM 2.

Milbo

I am sorry, looks like the svn go a lot committs last days. something is wrong.
however I uploaded a new version. A good opportunity to test the updater system. Just visit on your installation administrator/index.php?option=com_virtuemart&view=liveupdate and do an upgrade. Should work then (uah hopefully :-) )
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

franzpeter

Is it possible to extend the migration of categories and products? I did add a few rows to some VM tables like datasheet, EAN a.s.o.. If I add those rows to the VM tables and add that to the migration part too, would that work? Example: I use a row called EAN, which is in the old vm product table. To transfer that, it is possible to add such a row in the VM 2 category table too. I could add something to the migrator php like:
$product['product_ean'] = $product['product_ean'];
$product['product_datasheet'] = $product['product_datasheet'];
Same procedure for other additional rows.
As far as I can see in the migrator php it makes first a query $q = 'SELECT * FROM #__vm_product, so it seems to read the complete product table with all rows, even if some rows are not standard rows.
Would that work, or isn't it that simple?

Milbo

#13
Yes that should work, and then for the storing you just must add the ean in the file for the table products (BEcom/tables/products.php).

Then you must just add it to the gui and all is done for you, storing and so on.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

incolor

Milbo, thank you for your detailed response.

I tried to do a Live Update, but I got the following errors:

        JFolder::files: Path is not a folder
        ERRORNOTFINDJOOMLAXMLSETUPFILE

        Invalid package type. The update can not proceed.