Configuring Replication
The Publishing System Manager contains the Replication tab for configuring replication settings.
To enable replication:
- Open the Administration pane and click Publishing System.
- Select a publishing target from the list, and then click the Replication tab.
- Select Enable Replication for Publishing Target. (To enable replication to all targets at once, select Simultaneous replication on all targets.)
To add a new replication target, click Add a New Replication Target. A menu opens with a list of protocols for replicating files. To create a new replication target, select a replication type (click the name for configuration instructions):
- File Replication Target: Copies files using standard Microsoft Windows functionality.
- FTP Replication Target: Copies files using the File Transfer Protocol (FTP).
- FTP/SSL Replication Target: Copies files via FTP-SSL (FTP using SSL encryption for security). This is also referred to as FTPS.
- Secure FTP Replication Target: Copies files via SFTP, a file transfer protocol that employs the Secure Shell (SSH) protocol for security.
After your replication target is configured, replication takes place whenever a publish is performed. However, you may on occasion need to perform a replication manually.
Advanced Replication Settings
Some advanced settings can be configured for all replication types.
Exempt Locations
Exempt Locations are folders that are excluded from replication to the deployment location. You can use this collection of settings to exclude files by folder and by file extension.
To add an exemption, scroll to Exempt Locations, click the + button, and then configure the settings described below.
- Exempt Search Patterns: Excludes files containing a given string pattern or patterns. By entering wildcards and file extensions, you can exclude certain file types. For example, entering *.wmv would exclude from replication all Windows Media Video files in the exempt location. Use a pipe | to separate values. You can also exclude partial matches. For instance, p*.pdf excludes all PDF files starting with the letter "p".
- Exemption covers descendant directories: Applies the excluded pattern to subfolders of the exempt location.
Additional Locations
Folders to be replicated from outside the pub target folder. These are folders from outside the standard CMS directory structure that need to be piggybacked on the replication. For instance, if a site stores media files outside the standard media folder, it might be useful to include an external media folder here.
To replicate an additional location, scroll to Additional Locations, click the + button, and complete the following fields:
- Source Location [Required]: A hard drive path or UNC path. This location must exist before you enter it here. The CMS will not create it automatically.
- Target Location [Required]: The folder into which the additional files will be replicated. Choose a target location from the menu. The CMS will replicate the source location into the target location. It will also exclude from replication the folder corresponding to the target location in the pub target. In other words, if the source location is c:\media and the target location is /media/, the CMS doesn't replicate media from the pub target, but it does replicate c:\media into a new target location called media. No file merging occurs in the process.
Cleanup Exclusions
During a full publish, all content is deleted from the replication target before published content is replicated. Items listed as cleanup exclusions are excluded from deletion. Normally, these excluded items are not contained in the pub target folder, since that content will be overwritten by replication even if it's excluded from cleanup. Commonly excluded files are Web.config and favicon.ico.
To add a cleanup exclusion, scroll to Cleanup Exclusions and click the + button. The Location to Exclude field opens.
Files to be excluded begin with a forward slash (/favicon.ico), and folders to be excluded begin and end with a forward slash (/folder/). Enter an excluded location and, for a folder, select or clear Exclude all files.... Deselecting Exclude all files... opens additional settings:
- Exclude files Search Patterns: Search patterns to be excluded. Items that fit the search patterns (delimited with a |) will be excluded from cleanup, meaning that they won't be deleted. You can use wildcards to create search patterns (for example, k*.* excludes any file starting with a "k").
- Exclusion covers descendant directories: Excludes all folders under the excluded folder. If this setting is cleared, descendant folders will be deleted.
Any folder that has excluded items under it is automatically excluded from deletion too. Conversely, any folder that doesn't have excluded items under it, and that is not itself under a folder that excludes all descendants, is removed during cleanup.
Custom Commands
Custom commands invoked before and after replication. Custom commands make it possible to customize the replication process. For example, a custom command could be used to send out an email pertaining to the replication process. In most cases, a custom command points to a batch file, but any file type executable under Windows shell (for example, .exe) can be used. Enabling this setting opens additional configuration options.
- Custom command to execute before/after replication: File path to the custom command.
- Timeout: Time to wait (in seconds) before the command times out. Some replication tasks take a while. If there's no response after this specified timeout period, the command process terminates.