So I need to re-create some content from Sitecore 7.2 to a new Sitecore 8 instance. What we had in mind is to create a script using PowerShell in the new Sitecore 8 instance to fetch the needed data item from the old Sitecore 7.2 instance(via the Item Web Api), and then create new items based on that data. For this, we have to install Powershell Extension in the Sitecore 8 instance. So basically:

Old Instance >>> New Instance (using SPE to get data from old instance)

Is there any other better approach to tackle this ?

It's worth mentioning we may have to insert renderings dynamically when creating the items, and we need flexibility (for this matter, the Sitecore 8 ItemService API doesn't work for us, since it doesn't allow us to dynamically add renderings and such to an item).

Thanks so much, correct me if Im wrong, but since we need flexibility in terms of creating an item (adding renderings to the item, and such) and template may contain different fields from each other, I think the second option is more viable.
– Joel Alvarez MyrrieJan 2 '18 at 19:41

1

yes probably as with the migration done through scripting you have more control over what goes where and with which renderings. I guess this comes down to whether you want to keep your existing structure from your source instance to your target. if you want then option 1 and 3 probably are the best for you. If you have custom scenarios depending on conditions 'a' or 'b' you need to do 'c' then SPE is probably your best bet
– DiegoJan 2 '18 at 19:45

You will need some sort of script to manipulate and transform the data from one form to another. You could do this using some C# code and utilising the Sitecore API but my personal preference would be to use Sitecore PowerShell Extensions as you are planning to do.

Data Migration

In order to "migrate" the data from the old 7.2 instance to the new 8.2 instance you can use any of the options suggested by @Diego in his answer or use the Express Migration Tool (and select to migrate Items only).

This will then allow you to more easily work with the data in your SPE scripts since it is then a "local" instance and you do not need to mess around with the Item Web API as well as having the advantage of providing a richer API in my opinion. You can treat the items as data only and write transform scripts to create new items based off the old data in whatever structure you need, then finally delete the items once you have finished.

Secondary Master Database

If you really do not want to bring the old data into your new instance and want to treat it as a separate data repository then I would consider attaching the old master database from the 7.2 instance to your new 8.2 instance and then working with it directly from your SPE scripts.

You can now reference the old databse form your 7.2 instance directly in your PowerShell scripts to access the data and then copy/transform/create items in the master database of your new 8.2 instance:

Once your migration and transformation is complete you can delete the old database, connection string and config patch. This should providing an easier mechanism for you to write your scripts rather than using the Item Web API in my opinion.

The thing is, I don't think we can meddle too much with the instances in regards of installing things. Anyway, this answer is very informative and insightful, thanks so much!
– Joel Alvarez MyrrieJan 2 '18 at 20:33

@JoelAlvarezMyrrie If you don't want to attach a backup then you can point the ConnString to your existing 7.2 database and then it's just adding the config changes. Personally, I prefer not to work against a production database if it can be avoided.
– jammykamJan 4 '18 at 5:52

From there, you could write an SPE script that runs on the new 8.x instance and updates the renderings at that point, once all data is migrated over. It might make it easier than having to work with the APIs on the fly, unless you have a need to specifically do things on the fly.

From the old site, we aren't allowed to install anything, so Sitecore Express Migration tool is ruled out! Also, the instances site structures are different: templates might have different fields, etc.
– Joel Alvarez MyrrieJan 2 '18 at 20:17