This post has been migrated from www.experimentsincode.com, we apologise if some of the images or content is missing
Razl Script Mode is coming in the next release of Razl which will allow you to automate the process of pulling content between Sitecore instances. For those not familiar with Razl it is a tool that allows you to compare two Sitecore instances and move item and field changes from one instance to the other. Razl Script mode allows you to define a series of task in XML format that should be performed by Razl, these tasks can then be executed from the command line or as part of a build. This makes the following tasks very easy:<razl> <connection name="qa" install="true"> <url>http://razl-qa</url> <accessGuid>C63C521E-A912-4EB4-82F0-78F553CE3EF5</accessGuid> <database>master</database> <path>c:\sitecore\razl-qa\website</path> </connection> </razl>You can define as many connections as you like in the XML file, so one XML file can copy content between multiple servers. You can also instruct the script to install the connector on the target instance if you want. On live boxes it is better to install the Razl connector using the package installation mode in the Razl GUI, otherwise the live box would recycle every time you ran the script, a connection to live might look like this:
<connection name="live" readOnly ="true"> <url>http://Razl-LIVE</url> <accessGuid>C63C521E-A912-4EB4-82F0-78F553CE3EF5</accessGuid> <database>master</database> </connection>With our connections configured we can define the operations we want to perform, the following are support by script mode:
<operation name="CopyHistory" source="live" target="qa"> <parameter name="from">2</parameter> </operation>This will instruct Razl to copy all changes from live to qa within the last 2 days. Of course we can also specify this as a date and give a to date:
<operation name="CopyHistory" source="live" target="qa"> <parameter name="from">2014-01-01T00:00:00</parameter> <parameter name="to">2</parameter> </operation>This will copy everything from the start of the year until 2 days ago. When running the script Razl gives you lots of information about the tasks it is performing so that changes should be easy to audit: If you combine this new feature with Team Development for Sitecore you can have a fully automated deployment that will deploy the latest code and then pull the latest content onto an environment without any developer interaction.