How to retrieve or deploy Custom Metadata Records by ANT Migration Tool?
Gosh! This works: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_custommetadata.htm#meta_custommetadata
<types>
<members>*</members>
<name>CustomMetadata</name>
</types>
I just had some invisible character ( ​ Unicode Character 'ZERO WIDTH SPACE' (U+200B) http://www.fileformat.info/info/unicode/char/200b/index.htm ) copied from documentation between small 'm' and capitalised 'M':
<types>
<members>*</members>
<name>CustomMetadata</name>
</types>
Following are the steps to deploy custom metadata using force.com IDE
1)Make sure to download the latest force.com Migration tool from your salesforce instance
Setup | Tools
2)Drop the ant-salesforce jar into your lib of the ANT directory
sample path--C:\Program Files\apache-ant-1.9.0\lib
3)Use proper package XML as shown below
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>CustomMetadata</name>
</types>
<version>35.0</version>
</Package>
4)Run the ant retrieve to fetch all custom metadata files
5)Change the build.properties username and password to point to right instance and run ant deploy command
Once you have Force.com Migration Tool set up, you can also choose to deploy individual CustomMetadata records using the following format:
<types>
<members>MetadataObjectName.Record1Name</members>
<members>MetadataObjectName.Record2Name</members>
<name>CustomMetadata</name>
</types>