开发者

Sitecore - moving items from Web to Master (Packages?)

I'm running Sitecore 6.3.

I have a Sitecore Package which was originally wrongly created from the Web database instead of the Master database.

The database is long gone and I want to import this package into my new Sitecore instance, but run into the problem, that the Package gets directly into the Web database - whereas it is critical that it gets imported into the Master database instead.

I tried modifying the package manually by changing file names and references, but ran into problems when importing the package.

I discovered the Serialization feature of Sitecore 6.3, but it only allows me to de-serialize items which already exist, and in my case the Master database doesn't have the item.

What is the best way to move开发者_开发知识库 items from Web database back to Master?

Thanks


You can use the "Transfer Item to Another Database" feature, which you can find in the "Control Panel" -> "Database" menu.

Just login to the Sitecore desktop, switch to the web database and open the mentioned dialog. It will ask you for the source items/node and a destination... that´s it :)


Sitecore also have Transfer function that can we access from item level itself.

You can access it from item> Right Click> Copying> Transfer

Sitecore - moving items from Web to Master (Packages?)


I have posted a tool on Sitecore Marketplace which modifies the package. In other words, if you have a package created from web and want to install to master, you can use the tool to change the target database.

Moreover, it is better to use sitecore package than the transfer method. For more information, you may read my post on https://hishaamn.wordpress.com/2016/02/25/sitecore-from-web-to-master/

Link to how to use the tool: https://hishaamn.wordpress.com/2016/03/30/sitecore-package-modifier-tool/

Link to Tool: https://marketplace.sitecore.net/en/Modules/S/Sitecore_Package_Modifier.aspx


Sitecore - moving items from Web to Master (Packages?)

Please Select Web Database from Desktop Login. follow about step

item> Right Click> Copying> Transfer

then choose drop down web database


I've found that in Sitecore 8, Transfer (from the context menu and Control Panel > Database) fully moves the item from the source (web) to the target (master) database, ie when it is complete you will no longer have the item in your web database.

If you need to maintain the item in the source database consider making a master publishing target. Either connect to web and build the target there or create it in master and publish it to web. Then connect to web and publish the item to master.

Our master database is named "master", confirm your database name before doing this. Screenshot of master publishing target

Screenshot of new target in publishing window


For Sitecore 8+ users:

The Inconvenience - In Transfer method the items will be moved from web>master which not expected most of the time.

The Solutions - Using Sitecore package it's possible to copy items from web>master. @Hishaam already mentioned about the tool at Sitecore marketplace but then it adds another layer of complexity to install the tool.

By following below steps once can get it done without the need of any tool.

Step 1 Switch to web database from Sitecore Launchpad & create the sitecore package.

Step 2 Open the package zip file. You will see the following folders:

 1. properties 
 2. metadata
 3. items 
 4. installer

Step 3 Go inside properties\items & rename the "web" folder to "master"

Step 4 Go inside items & rename the folder "web" to "master"

Step 5 Open the installer folder and extract only the project file. Navigate to the node Sources & change the "web" database reference to "master" as shown below.

Sitecore - moving items from Web to Master (Packages?)

Step 6 Once this is done, drag and drop the updated project file to the same directory in the package. In other words, overwrite it with the existing one.

A popup will appear when try to close the zip file saying that if you want to update the zip archive. Click Yes button to update.

This method is more reliable than Transfer method and very efficient for bulk items copying as well. You can install items from one environment to another.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜