Documentation

Transfer Data with the remotecopy Utility

You can transfer between your client file system and your cloud cluster with the remotecopy utility provided with Parallel Computing Toolbox™ as:

matlabroot/toolbox/parallel/bin/remotecopy

The remotecopy utility uses an identity file instead of passwords. This is the private SSH key file you download for a cluster from Cloud Center as described in Download SSH Key Identity File.

Transfer Data to the Cloud

This example shows how to copy the file /home/cloudtmp/emem.mat from a local UNIX machine to a cloud cluster machine:

  1. Navigate to the location of the remotecopy utility, and run the command as shown.

    cd /matlabinstall/toolbox/parallel/bin
    ./remotecopy -local /home/cloudtmp/emem.mat \
        -to -remote /shared/persisted/emem.mat \
        -remotehost ec2-107-21-71-51.compute-1.amazonaws.com \
        -protocol scp -username clouduser -identityfile /home/.ssh/your-key.pem \
        -passphrase ""

    (For Windows, use appropriate slashes, path names, and ^ to indicate continuation of the command on multiple lines. For other options or information about mixed platforms, see remotecopy -help.)

    The -remotehost name is available in Cloud Center under the details for the head node of a running cluster.

  2. With the data files in place on the cloud cluster machines, you can specify their location in the job’s AdditionalPaths property to provide access to them for the MATLAB workers.

Retrieve Data from the Cloud

This example shows how to copy the file /shared/persisted/emem.mat from a cloud cluster machine to a local UNIX machine as /home/cloudtmp/return_emem.mat.

cd /matlabinstall/toolbox/parallel/bin
./remotecopy -local /home/cloudtmp/return_emem.mat \
    -from -remote /shared/persisted/emem.mat \
    -remotehost ec2-107-21-71-51.compute-1.amazonaws.com \
    -protocol scp -username clouduser -identityfile /home/.ssh/your-key.pem \
    -passphrase ""

(For Windows, use appropriate slashes, path names, and ^ to indicate continuation of the command on multiple lines. For other options or information about mixed platforms, see remotecopy -help.)

The -remotehost name is available in Cloud Center under the details for the head node of a running cluster.

Related Topics