Feed on
Posts
Comments

My last entry about serializing items and whole databases was kind of more an introduction. Today I’m going to explain in detail what the ribbon buttons do. I’ll finish this series tomorrow by showing how to do this from code.

Developer toolbar with serializating tools

Serialize Item: This option let’s you serialize the currently selected item to disk. This means that when you serialize for example /sitecore/content/home, the following stuff will be created in %root%/data/serialization:

  1. Let’s assume that the item located is in the master database, then the action will create a folder ‘master’.
  2. The action creates creates the folder: /sitecore and /sitecore/content
  3. Finaly the item creates a home.item-file which contains the contents of the item

Serialize Tree: This option is similar for the first 2 steps comparing it to serialize item. In the third step the action now creates a hierarchy of items and folders from the current item.
Let’s assume that the home item has 2 child items, e.g. child1 and child2. The system will create the following folders and items:

  • /master/sitecore/content/home.item (item-file)
  • /master/sitecore/content/home/ (folder)
  • /master/sitecore/content/home/child1.item (item-file)
  • /master/sitecore/content/home/child2.item (item-file)

Update Item: This option loads an item from disk without forcing to overwrite. So if a field in empty(null) or a versions doesn’t exists, the Update Item will add this data, but never overwrite.

Revert Item: This options load an item from disk but forces to overwrite. So when fields have changed, they will get processed and overwritten. You can imagine this might be a bit more time intensive then the previous one.

Update Tree: Same as update item, but now for a whole tree.

Revert Tree: Same as revert item, but now for a whole tree.

Update Database: Same as revert item, but now for a whole database.

Revert Database: Same as revert item, but now for a whole database.

 

There’s also a hidden command, which is of course unsupported ;). It’s called ‘LoadAllDatabases’. To enable this, go to you core database and navigate to: /sitecore/content/applications/Content Editor/Ribbons/Chunks/Serialize. Then duplicate ‘Update Database’ and ‘Revert Database’. Change the names to ‘Update all Databases’ and ‘Revert all Databases’. Use the following commands: ‘itemsync:loadalldatabases’ and ‘itemsync:loadalldatabases(revert=1)’.
Have fun!

2 Responses to “Sitecore 6: Serializating items and whole database – Part 2”

  1. Brian says:

    Firstly, thanks for blogging. The biggest negative in developing with Sitecore is the lack of online resource, i.e. compared to Sharepoint there is nothing!

    Anyway, I just wondered whether you could add a section on trouble-shooting where the serialization just doesn’t work. I’ve got a bunch of documents of different filetypes which won’t serialize and all I get is:
    ManagedPoolThread #12 10:47:26 INFO Serializing master/sitecore/media library/Files/Intranet/Documents/AU Policies Procedures and Forms/Forms/Finance and Accounting/FOR_BLUE CHEQUE REQUISITION FORM FA37
    ManagedPoolThread #12 10:47:26 INFO Job ended: ItemSync (units processed: )

    Any ideas?

  2. Zyad Rujeedawa says:

    Hello,
    Does this mean that TDS is no longer a viable option? TDS is really expensive compared to this free solution.

Leave a Reply