CopyStorm provides a command line interface to enable CopyStorm to run under Windows Task Scheduler or CRON on Linux. Begin by creating a CopyStorm configuration file.
The following example Windows command line will run CopyStorm where:
- CopyStorm is installed in C:\CopyStorm.
- CopyStorm’s configuration file name is DemoCredentials.copyStorm.
- CopyStorm’s configuration file is located in C:\CopyStormDemo.
- The log file is redirected to a text document named C:\users\Mary\LogFile.txt.
- This is optional.
CopyStorm.bat -run ../CopyStormDemo/DemoCredentials.copyStorm >c:/users/Mary/LogFile.txt
A similar command line for Linux or Mac will look like:
sh CopyStorm.sh -run ../CopyStormDemo/DemoCredentials.copyStorm >/home/mary/LogFile.txt
Command Line Reference
|-sftype||Sandbox | Production||Override the Salesforce instance type selected in the configuration file.|
|-sfuser||Username||Override the Salesforce username in the configuration file.|
|-sfpassword||Password||Override the Salesforce password in the configuration file.|
|-sftoken||Security Token||Override the Salesforce security token in the configuration file.|
|-dbconnection||Connection String||Override the database connection string in the configuration file.|
|-dbuser||Username||Override the database username in the configuration file.|
|-dbpassword||Password||Override the database password in the configuration file.|
|-dbschema||Schema Name||Override (or set) the database schema value in the configuration file.|
|-proxyHost||Host Name||Override the proxy server in the configuration file. Example: proxy.capstorm.com|
|-proxyPort||Port Number||Override the port number used by the proxy server.|
|-proxyUser||Username||Override the username used to authenticate with the proxy server.|
|-proxyPassword||Password||Override the password used to authenticate with the proxy server.|
|-config||Directory||Search this directory for XML configuration overrides. Configurations in this directory will override those in the “config” subdirectory in CopyStorm’s installation directory.|
|-apiTraceFile||Filename||Record all messages to/from Salesforce in this file. Note that this will generate a very large file and is typically only useful when debugging problems with Salesforce.|
|-debug||Write verbose debugging information, including SOQL statements sent to Salesforce, to stderr.|
|-modifiedSince||Set the of the Modified Since parameter, overriding any value in the configuration file.|
|-modifiedThru||Set the of the Modified Thru parameter, overriding any value in the configuration file.|
|-includedTables||Set list of tables to include in the backup, overriding any value in the configuration file.|
|-excludedTables||Set list of tables to exclude from the backup, overriding any value in the configuration file.|
CopyStorm Exit Codes
In command line mode CopyStorm returns these exit status codes:
- 0 = the run completed normally with no exceptions.
- 1 = the run completed but had one or more recoverable errors.
- 2 = the run may have completed but there are exceptions that need investigation.
- 2 = credential or license error — one of:
- Salesforce or database credentials are wrong.
- Your CopyStorm license has expired