VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: iDanny on March 23, 2011, 03:10:07 AM

Title: Migrating data from VM 1 to VM 2 ?
Post by: iDanny on March 23, 2011, 03:10:07 AM
Hi,

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

Thanks,
Danny
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: jjk on March 23, 2011, 08:26:39 AM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: lindapowers on March 26, 2011, 23:31:01 PM
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.

Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: jjk on March 27, 2011, 09:47:01 AM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: xpozay on July 14, 2011, 11:21:58 AM
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
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: jenkinhill on July 14, 2011, 15:18:28 PM
Test VM2 RC2 and migrator. http://virtuemart.net/news/list-all-news/405-virtuemart-2-rc-2-ready-for-download
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 15, 2011, 05:25:23 AM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 15, 2011, 07:26:31 AM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 15, 2011, 10:02:15 AM
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
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: franzpeter on July 15, 2011, 14:27:40 PM
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?
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: franzpeter on July 15, 2011, 15:21:23 PM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 15, 2011, 18:04:02 PM
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 :-) )
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: franzpeter on July 15, 2011, 19:33:17 PM
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?
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 15, 2011, 19:51:19 PM
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.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 15, 2011, 23:50:12 PM
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.

Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 16, 2011, 00:41:54 AM
strange thing, 4 people did an upgrade and it worked, but for 2 people it did not worked. Please tell me more about your system. Linux, mac, windows, php version, ftp-layer or not
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: franzpeter on July 16, 2011, 11:53:24 AM
In my case I use a mac with MAMP. The problem seems to be the max execution. I did try it on my localhost with both (setting max execution time to true or false). the script runs for 0.0003xxxxx second and stops. The running time seems even to be not sufficient to migrate one user or order. I do not use ftp layer. I'll try it with ftp layer and report about progress or failure.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 16, 2011, 13:17:57 PM
The script uses the max execution time set by the php.ini.
Of course this should be high... my server has 2 minutes,.. 1 minute is normal, I would say below 20 secs you shouldnt try to setup a joomla on it.
the max_execution time is NOT a boolean.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 16, 2011, 17:56:41 PM
Akeeba wont let me install the 1.9.8b update and I get a 500 error when I try with Joomla installer.

Hmm...
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 16, 2011, 23:48:48 PM
CassVox, which joomla version you are using?
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 17, 2011, 00:24:50 AM
Joomla 1.5.23 from a JoomlaXTC jumpstart install w/Kraftwerks template.

Had installed 1.9.8RC started to migrate, Akeeba advised of upgrade, did 1.9.8a with no problem but then wouldn't do b.

When I attempted to install manually encountered 500 errors, "Another component is already using that file.." errors and loadmodule errors.  Even after removing.

Wiped the entire install and started over.  Was able to manually install 1.9.8b and allinone module but unable to migrate products.

Now encountering fatal errors around convertECB.php and class_currency_display.php
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 17, 2011, 02:27:53 AM
I started over from scratch with a fresh clone of my J1.5.23+VM1.1.9.

Then I installed VM1.9.8RC2b.

I still cant get either the Products or Orders to migrate successfully, but at least now there are no blank white pages while using the migration tools.

When I go to list the Products, however, I get a blank white page and this error in the Apache log:

PHP Fatal error:  Cannot redeclare class convertECB in ***/administrator/components/com_virtuemart/classes/currency/convertECB.php on line 24, referer: http://***/administrator/index.php?option=com_virtuemart&view=config

Similarly, when I try to list the Orders, I get a blank white page and this error:

PHP Fatal error:  Cannot redeclare class convertECB in ***/administrator/components/com_virtuemart/classes/currency/convertECB.php on line 24, referer: http://***/administrator/index.php?option=com_virtuemart&view=updatesmigration


Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 17, 2011, 02:44:59 AM
I overcame those by renaming each class.  In my case I added a 1 to each class name.

I did run into an additional error with the global.php line 209 after doing that but it was just a simple correction of the name to match by adding the 1.

So far so good there.

Now on to the next fire.

Edit: Next fire is that JoomlaXTC Framework and VM2 ARE NOT playing nicely together... blank pages on the front end.  *sigh*

Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 17, 2011, 04:04:10 AM
QuoteI overcame those by renaming each class.  In my case I added a 1 to each class name.

I guess that's just a little over my head. Can you specify the change in more detail?

On line 24 I tried changing
class convertECB {
to
class convertECB1 {
but it didn't seem to do anything different.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 17, 2011, 04:12:41 AM
Actually that is exactly what I did with both.  Be sure though that you are updating the file from the Administrator>components>com_virtuemart> file rather than the main component file.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: incolor on July 17, 2011, 04:40:11 AM
Doh!

I was looking at the file on my live site, not my VM2 sandbox.

Thanks
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 17, 2011, 07:25:08 AM
Quote from: CassVox on July 17, 2011, 00:24:50 AM
Joomla 1.5.23

Had installed 1.9.8RC started to migrate, Akeeba advised of upgrade, did 1.9.8a with no problem but then wouldn't do b.
Strange thing. Packages are very simular. Same xml, same structure, hm.

Quote from: CassVox on July 17, 2011, 00:24:50 AM
When I attempted to install manually encountered 500 errors, "Another component is already using that file.." errors and loadmodule errors.  Even after removing.
Even more strange, this messages should never appear, when you install a component with the upgrade method. VM2 is configured that way.
[/quote]
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 17, 2011, 07:30:22 AM
Quote from: CassVox on July 17, 2011, 04:12:41 AM
Actually that is exactly what I did with both.  Be sure though that you are updating the file from the Administrator>components>com_virtuemart> file rather than the main component file.

I am wondering, which main component file is called convertECB.php. Also the global.php does not exist anylonger in VM2. Atm for me it looks so, that the joomla updates method makes errors. So I assume you used the following method:

You have already a live store running vm1. You made a local copy, for exampel using akeeba backup, then you just run the installer (which is right that way). After that you get trouble with the global.php. This is a clear sign, that the update process does not upgrade anything right.

the global.php is obsolete since more than a year or so. So installing VM2 over VM1 seems to let to many rests in the system. Hmm annoying.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 17, 2011, 09:59:57 AM
Well I hardly meant to be annoying!  ;D

So let me give a bit more detail, my Joomla install is done as part of the JoomlaXTC jumpstart process, which includes VM1.1.6 updated to VM1.1.9stable

In my original attempt to migrate I was doing so with a store that included original sample data of the jumpstart install, my own added data and VM1 had been hacked to make use of multi location warehouse.  That was the point I received the initial errors I posted about.  I uninstalled all of VM at that point and reinstalled using VM2.02RC and ended up with the php errors I referred to.

AND NOW.. WORKING FROM A BRAND NEW INSTALL OF JOOMLAXTC KRAFTWERKS JUMPSTART.

Install goes well... back end VM2 loads up fine.  (You should either have the update tools be a default check or more clearly note WHAT exactly the user is being sent to Configuration to do, by the way)

When we do the allinone migration at this point moves categories successfully but not products. Sees the 85 there to be migrated.. but doesn't.
Same with Migrate Products.

And the front end is due to the Kraftwerks template... they just don't like each other.  Any suggestions on why that maybe would be greatly appreciated.

Ugh.

Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 17, 2011, 17:54:59 PM
Quote from: CassVox on July 17, 2011, 09:59:57 AM
Well I hardly meant to be annoying!  ;D

lol, I am sorry, I meant the behaviour of the joomla upgrader is annoying, not you. Afaik I sent you a message to contact me in skype, would I do that, when you would annoy me? :-)

First a big sorry from my side. We (the team) actually wondered what went wrong, so we digged deeper and found out that we may have a problem with the svn. It started one week ago, that developers had problems to update or committ. Some teammembers had old files and strange problems. We hope anything works now again smoothly.

I dont know how, maybe due the svn thing, I found some errors in the code, which I had fixed more than week ago or so. Then I found a new problem. The migrator takes the max execution time, but did not care about the used memory.

I found out that my migration sampel needs 25 MB just to load the users (pure mysql list). So I am adding at the moment a precalculation, which limits the db input to fit the max memory settings of the server.

The next problem is the our installation package, because it should run on j1.5 and j1.6. We just didnt find the reasons for the problem with it yet. I could upgrade 1.9.8 to 1.9.8a using the installer, but not 1.9.8a ->1.9.8b. But the normal installation with the joomla interface worked in all cases.

Additionally to that I found a new problem, when you directly update from vm1.1 without deleting the files. It is using then the old toolbar and tries to load old stuff, which leads to problems (like the currency thing). I will add a button "delete old vm files" and will rename the toolbar.virtuemart.php to something else. I think it should be written so, that you can leave your old data there, some people may use it to port some custom hacks.

When you contact me in skype I would like to send you a test packet.

Until then,
Max
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 17, 2011, 19:31:06 PM
LOL... Well, to be honest I can be pretty annoying.  ;)

Anyway, I added you on Skype.  I am futzing with a more immediate solution to the mall style use of Virtuemart but would be very glad to test for you as I would rather use something made by better coders than myself.

I code out of need not by choice.  LOL
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: franzpeter on July 18, 2011, 11:54:31 AM
@Milbo,

did reinstall VM 2, put 600 as max_execution_time and now it works. It is even able to convert 20 000 products. So the max_execution_time seems to be the clue.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: Milbo on July 18, 2011, 12:34:46 PM
ah,.. great, good.

Yepp.
I added yesterday also a check for the Ram size.

the idea is that the installer should be robust, that means it stores  the new ids and you can use it as often as you want regardless which order. So that people with a limited execution time just need todo the process some times. Ofc this should be done later by a nice js script.
Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: CassVox on July 20, 2011, 22:23:31 PM
In newest version 1.9.8c following issue.

Two sets of text for "Save" "Apply" "Cancel" on the main Configuration screen.

Neither set works so unable to Save new setting with Update tool enabled.

****Edit***** Uninstalling and reinstalling solved this issue.

Title: Re: Migrating data from VM 1 to VM 2 ?
Post by: AH on February 03, 2014, 19:52:44 PM
Loving how easy it is to add a new field to the product table and get it visible/editable in admin!

Thanks VM team for a great product!