Sean Holmesby

.NET and Sitecore Developer

By

Team Development for Sitecore – Using the Latest Data

I originally published this post on the Igloo blog.

Team1

In the blog post, Team Development for Sitecore – General Usage, I mentioned that we start our development by grabbing the latest data from our content entry or live server. This blog post touches on how you can retrieve this data so that you are working with the latest Sitecore items in your development environment.

Full Database backup and restore

One option, which is the ‘cover-all-bases’ solution, is to retrieve a full database backup from your content entry environment, and install it locally to your machine. Some things to consider:-
– It can be time consuming to backup, transfer, and restore the databases locally.
– You must make sure that you don’t have any outstanding Sitecore changes locally, otherwise you’ll lose them.
– Databases must be installed on all of the developers machines (again, time consuming).
– Database backups from content entry can be quite large, as the log file (.LDF) will grow with every Sitecore change. Of course you can shrink the log file if you want.

In most cases, you may not need the complete database, but instead just the Sitecore items you’ll be working on.

Retrieving the items from the Content Entry Server

TDS allows you to point you’re local project to any instance. You can therefore point your TDS project to the content entry server, and pull in the live items.
To do this you will need to have the TDS webservice, config file, and DLL on your content entry server (See Team Development for Sitecore – Settings and Builds).

To retrieve the items, follow these steps:-

1. Open up the properties of the TDS project, click the ‘Build’ tab and change the ‘Sitecore Web Url’ to point to your content entry server.
Properties

2. Save the project properties, and maybe even unload then reload it, just to make sure the settings update. (You’ll want to be careful when you’re connected to your content entry environment. Do the following steps as quick as you can so you don’t accidentally change something that is live.)

3. Right click on an item that is an ancestor of the items you want to grab, and select ‘Get Sitecore Items’.
get_sitecore_items

4. Select the items, and click ‘Get Items’. The latest items from your content entry server will now be serialised back into you TDS project.
get_sitecore_items_select

5. Change the ‘Sitecore Web Url’ property back to point to your local machine, and again unload/reload to make sure we’re pointing to the right place.

6. Now that your TDS project is pointing to your local instance again, right click on the ancestor and select ‘Sync with Sitecore’.
Sync_with_Sitecore

7. You will now get a list of the changes for all of the items you just brought across. The project files are what’s on the content entry server, the sitecore items are what’s in your local instance. Therefore you want to update your local instance with the items saying ‘Project item Newer’.
project_item_newer

8. Select the items and change the drop down to ‘Update Sitecore’. Click ‘Do Updates’ down the bottom, and your local instance with have the latest data.
update_sitecore

You now have the latest sitecore data on your local machine, so you can have the peace of mind that the Sitecore data you’re working with is the latest and greatest from the live server.

One Response to Team Development for Sitecore – Using the Latest Data

  1. Pingback: Razl Dazl: The Sitecore Database Compare Tool | Sean Holmesby

Leave a Reply

Your email address will not be published. Required fields are marked *