移行ツールAntインストール 、データ移行

参考URL

https://www.javadrive.jp/ant/install/index1.html

 

1.移行ツールAntインストール

 apache-ant-1.10.3

 

場所 : C:\xxx

 

ーーーーーーーーーー

以下の参考URL

SFDC:Force.com移行ツールの使い方 - tyoshikawa1106のブログ

 

Salesforce 移行ツールAntインストール

 salesforce_ant_27.0

場所 : C:\xxx

 

 

 2.データ移行

 

・build.properties

# build.properties
#

# Specify the login credentials for the desired Salesforce organization
sf.username = xxx@xxx.com
sf.password = xxxx
#sf.pkgName = <Insert comma separated package names to be retrieved>
#sf.zipFile = <Insert path of the zipfile to be retrieved>
#sf.metadataType = <Insert metadata type name for which listMetadata or bulkRetrieve operations are to be performed>

# Use 'https://login.salesforce.com' for production or developer edition (the default if not specified).
# Use 'https://test.salesforce.com for sandbox.
sf.serverurl = https://xxx.com

# If your network requires an HTTP proxy, see http://ant.apache.org/manual/proxy.html for configuration.
#

 

・build

<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">

<property file="build.properties"/>
<property environment="env"/>

<!-- Test out deploy and retrieve verbs for package 'mypkg' -->
<target name="test">
<!-- Upload the contents of the "mypkg" package -->
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployRoot="mypkg"/>
</target>
</project>

 

・ リリース対象登録

場所 : C:\xxx\salesforce_ant_27.0\sample\mypkg\approvalProcesses

 

・ package

場所 : C:\xxx\salesforce_ant_27.0\sample\mypkg

---

<?xml version="1.0" encoding="UTF-8"?>
<types>
<members>*</members>
<name>ApprovalProcess</name>
</types>
<version>36.0</version>
</Package>
 

---

 

・コマンド

ant -Dpackage.xml=package.xml -f build.xml test