| ascp: Transferring from the Command Line with Ascp |
121
The JSON payload has the general syntax of key-value pairs in a "cloud-metadata" section:
{
"aspera": {
"cloud-metadata": [
{"
key1
":"
value1
"},
{"
key2
":"
value2
"},
...
] } }
Restrictions on key-value pairs:
•
key
cannot be
ctime
,
mtime
, or
atime
. These keys are reserved and the transfer fails if they are used.
•
key
might be case-sensitive, depending on the destination storage type.
• The key-value pair must be less than 1024 characters.
Sample Ascp Session with Metadata
# ascp --tags='{"aspera":{"cloud-metadata":[{"location":"skellig"}]}}'
--mode=send --user=rey --host=s3.asperasoft.com sourcefile.mov s3://
s3.amazonaws.com/project
Multi-Session Transfers
Ascp can transfer content faster by using multi-session transfers (also known as parallel transfers and multi-part
transfers) to and from multi-node and multi-core servers and clusters, on premises or in the cloud. This article
describes the syntax of a multi-session transfer and provides an example.
Multi-session syntax
To run simultaneous
ascp
transfers, you can run each command from its own terminal window, run a script in a
single terminal, or background processes with the shell.
For a typical push (
--mode=send
) transfer:
# ascp -C
nid_1
:
ncount
-l
max_rate
[-O
port_1
][--multi-
session-threashold=
threshold
] [--tags={\"aspera\":{\"xfer_id\":
\"
transfer_id
\"}}]
source_path
hostname
:
destination_path
# ascp -C
nid_2
:
ncount
-l
max_rate
[-O
port_2
] [--multi-
session-threashold=
threshold
] [--tags={\"aspera\":{\"xfer_id\":
\"
transfer_id
\"}}]
source_path
hostname
:
destination_path
...
# ascp -C
nid_n
:
ncount
-l
max_rate
[-O
port_n
] [--multi-
session-threashold=
threshold
] [--tags={\"aspera\":{\"xfer_id\":
\"
transfer_id
\"}}]
source_path
hostname
:
destination_path
Where:
•
-C
nid
:
ncount
tells Ascp that the same source and destination are being used by multiple, concurrent
sessions.
nid
is the node ID and
ncount
is the number of nodes or cores. The valid range of values for
nid
and
ncount
is 1 through 128, and
nid
must be less than or equal to
ncount
.
•
-O
port
is used to assign each session to a different UDP port. This is
required
when the server's operating
system does not support concurrent sessions using the same UDP port. This applies to Windows, macOS, Isilon
OneFS, and Solaris operating systems.
Note:
Make sure that the server's firewall is configured to accept transfers on the range of UDP ports.
•
--multi-session-threshold
is an optional argument that enables files to be split between sessions.
The threshold value specifies, in bytes, the smallest-size file that can be split. Files greater than or equal to the
threshold are split, while those smaller than the threshold are not. If the multi-session threshold is set to 0 (zero),
files are not split.