Command Line 2018-12-10T21:20:40+00:00

Command Line

CopyStorm/Restore is generally used in GUI mode, but it is possible to run Copystorm/Restore as a command line application. This is useful for repetitive tasks such as:

  • Refreshing 15 training Salesforce sandboxes in preparation for the next training class.

Prerequisites:

  • A CopyStorm/Restore configuration file. This is the file saved by the GUI when selecting File -> Save As.

The simplest form of a CopyStorm/Restore command line is:

  • Windows:
    • CopyStormRestore.bat -run myConfig.copyStormRestore
  • Linux / Mac:
    • sh CopyStormRestore.sh -run myConfig.copyStormRestore

When running in command line mode CopyStorm/Restore will write progress and any errors encountered to stdout, in addition to the Tracker Database.

Often when CopyStorm/Restore is run in batch mode any history about past restores stored in the Tracker Database should be forgotten. The script that launches CopyStorm could delete the existing Tracker Database — and if so, Copystorm/Restore will automatically recreate it. However, a simpler solution is to use the “-restart” command-line switch. When the “-restart” switch is present, Copystorm/Restore will reset the Tracker Database before the restore begins. For example,

  • Windows
    • CopyStormRestore.bat -restart -run myConfig.copyStormRestore
  • Linux / Mac:
    • sh CopyStormRestore.sh -restart -run myConfig.copyStormRestore

Command Line Reference

Command Line Switch Description Notes
-restart Reset the CopyStorm/Restore tracker database before starting the restore. This will delete all historical data in CopyStorm/Restore. Ids restored in previous jobs will no longer be available.
-scan Run a candidate scan before starting the restore. This will search the CopyStorm database for any new records matching the Restore Set prior to starting the restore.
-run Specifies the configuration file used to drive the restore.
-sftype The type of Salesforce instance. Recognized values include:

  • Production
  • Sandbox
  • DatabaseDotCom
-sfuser Salesforce username.
-sfpassword Salesforce password.
-sftoken Salesforce security token, if required by your organization.
-dbuser CopyStorm database username.
-dbpassword CopyStorm database password.
-dbconnection CopyStorm database connection string.
-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

CONTACTS

Product Questions: info@capstorm.com
Technical Support: support@capstorm.com
Phone: +1 314.403.2143