Percipient Studios logo

Umbraco Courier from the Command Line

03 October 2012
Filed under: umbraco, courier - by Douglas Robar

Using the Courier Extraction Console

Courier 2.7 was current at the time of this writing

There are two parts to Courier: packaging and extracting. Both parts are available from the Courier section of the Umbraco backoffice interface as well as by right-clicking on items within the various trees of the backoffice.

There is also a command-line extraction tool. Its primary purpose is to allow automation of Courier activity as part of your Visual Studio project's build events, or from your build server. You develop locally and upon building your project your changes to datatypes, macros, templates, content, etc. can be loaded into a staging or QA site and automated unit tests run. Very slick.

You can find out more about this in the Umbraco Codegarden 11 Keynote video (at about 43 minutes in) and the Team Development using Courier session by Per. Both are highly recommended viewing.


The extraction console application (and source) is available from

  1. Copy the executable and associated dlls to some location. Personally, I copy into the site's ~/bin folder but that may not be required. You'll also end up with a ~/bin/plugins folder containing associated dlls. Additional information at
  2. Copy the ~/config/courier.config file to the extraction console's folder (~/bin in this example). Also copy it to the ~/bin/plugins folder. I'm not sure which folder contains the config file that is used but it definitely uses a local copy of the config file rather than the site's copy used by the Umbraco backoffice, thus allowing multiple config files to be used with the command line extraction console.
  3. If not already done, create 'revisions' for each of the parts of the original site (datatypes, doctypes, macros, templates, media, document, etc. as noted elsewhere) using the backoffice. These revisions will be stored in the ~\App_Data\courier\revisions\revision_name folders.

Run from the Command Prompt

  1. Once the packaging of the revisions is complete, open a command prompt. I don't know if it matters, but to be on the safe side I always run it from a command prompt that has 'run as Administrator' enabled.
  2. Change directory to the desired revision and launch the extraction console:

    Command prompt:
  3. You should see a dependency graph being created with more than zero items (if it is zero items you may not have a valid revision or be in the correct revision folder)
  4. Press the 'Y' key to continue
  5. When prompted for the 'Website to connect to?' enter the 'alias' of the site as noted in the local courier.config file.

Identifying Errors

Be sure to turn on all logging in the config file. This will not slow down Courier appreciably, even for very large runs.

Log files will be saved in the ~\App_Data\courier\revisions\revision_name\app_data\courier\logs folder. Always review them as important issues may appear there that may not appear in the console window itself.

0 comments for “Umbraco Courier from the Command Line”

powered by <XSLTsearch>


Follow Us

RSS Feed
Follow us on Twitter
Follow us on Flickr