CLI Menu
  • Introduction
  • QuickStart
  • Collections vs Endpoints
  • High Assurance
  • Environment Variables
  • Reference
    • CLI Changelog
    • GLOBUS API AUTH
    • GLOBUS API FLOWS
    • GLOBUS API GROUPS
    • GLOBUS API SEARCH
    • GLOBUS API TIMER
    • GLOBUS API TRANSFER
    • GLOBUS BOOKMARK CREATE
    • GLOBUS BOOKMARK DELETE
    • GLOBUS BOOKMARK LIST
    • GLOBUS BOOKMARK RENAME
    • GLOBUS BOOKMARK SHOW
    • GLOBUS CLI-PROFILE-LIST
    • GLOBUS COLLECTION DELETE
    • GLOBUS COLLECTION LIST
    • GLOBUS COLLECTION SHOW
    • GLOBUS COLLECTION UPDATE
    • GLOBUS DELETE
    • GLOBUS ENDPOINT ACTIVATE
    • GLOBUS ENDPOINT DEACTIVATE
    • GLOBUS ENDPOINT DELETE
    • GLOBUS ENDPOINT IS-ACTIVATED
    • GLOBUS ENDPOINT LOCAL-ID
    • GLOBUS ENDPOINT MY-SHARED-ENDPOINT-LIST
    • GLOBUS ENDPOINT PERMISSION CREATE
    • GLOBUS ENDPOINT PERMISSION DELETE
    • GLOBUS ENDPOINT PERMISSION LIST
    • GLOBUS ENDPOINT PERMISSION SHOW
    • GLOBUS ENDPOINT PERMISSION UPDATE
    • GLOBUS ENDPOINT ROLE CREATE
    • GLOBUS ENDPOINT ROLE DELETE
    • GLOBUS ENDPOINT ROLE LIST
    • GLOBUS ENDPOINT ROLE SHOW
    • GLOBUS ENDPOINT SEARCH
    • GLOBUS ENDPOINT SERVER ADD
    • GLOBUS ENDPOINT SERVER DELETE
    • GLOBUS ENDPOINT SERVER LIST
    • GLOBUS ENDPOINT SERVER SHOW
    • GLOBUS ENDPOINT SERVER UPDATE
    • GLOBUS ENDPOINT SET-SUBSCRIPTION-ID
    • GLOBUS ENDPOINT SHOW
    • GLOBUS ENDPOINT STORAGE-GATEWAY LIST
    • GLOBUS ENDPOINT UPDATE
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE FROM-JSON
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE POSIX
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE S3
    • GLOBUS ENDPOINT USER-CREDENTIAL DELETE
    • GLOBUS ENDPOINT USER-CREDENTIAL LIST
    • GLOBUS ENDPOINT USER-CREDENTIAL SHOW
    • GLOBUS FLOWS DELETE
    • GLOBUS FLOWS LIST
    • GLOBUS FLOWS SHOW
    • GLOBUS FLOWS START
    • GLOBUS GCP CREATE GUEST
    • GLOBUS GCP CREATE MAPPED
    • GLOBUS GET-IDENTITIES
    • GLOBUS GROUP CREATE
    • GLOBUS GROUP DELETE
    • GLOBUS GROUP INVITE ACCEPT
    • GLOBUS GROUP INVITE DECLINE
    • GLOBUS GROUP JOIN
    • GLOBUS GROUP LEAVE
    • GLOBUS GROUP LIST
    • GLOBUS GROUP MEMBER ADD
    • GLOBUS GROUP MEMBER APPROVE
    • GLOBUS GROUP MEMBER INVITE
    • GLOBUS GROUP MEMBER LIST
    • GLOBUS GROUP MEMBER REJECT
    • GLOBUS GROUP MEMBER REMOVE
    • GLOBUS GROUP SET-POLICIES
    • GLOBUS GROUP SHOW
    • GLOBUS GROUP UPDATE
    • GLOBUS LIST-COMMANDS
    • GLOBUS LOGIN
    • GLOBUS LOGOUT
    • GLOBUS LS
    • GLOBUS MKDIR
    • GLOBUS RENAME
    • GLOBUS RM
    • GLOBUS SEARCH DELETE-BY-QUERY
    • GLOBUS SEARCH INDEX CREATE
    • GLOBUS SEARCH INDEX DELETE
    • GLOBUS SEARCH INDEX LIST
    • GLOBUS SEARCH INDEX ROLE CREATE
    • GLOBUS SEARCH INDEX ROLE DELETE
    • GLOBUS SEARCH INDEX ROLE LIST
    • GLOBUS SEARCH INDEX SHOW
    • GLOBUS SEARCH INGEST
    • GLOBUS SEARCH QUERY
    • GLOBUS SEARCH SUBJECT DELETE
    • GLOBUS SEARCH SUBJECT SHOW
    • GLOBUS SEARCH TASK LIST
    • GLOBUS SEARCH TASK SHOW
    • GLOBUS SESSION CONSENT
    • GLOBUS SESSION SHOW
    • GLOBUS SESSION UPDATE
    • GLOBUS TASK CANCEL
    • GLOBUS TASK EVENT-LIST
    • GLOBUS TASK GENERATE-SUBMISSION-ID
    • GLOBUS TASK LIST
    • GLOBUS TASK PAUSE-INFO
    • GLOBUS TASK SHOW
    • GLOBUS TASK UPDATE
    • GLOBUS TASK WAIT
    • GLOBUS TIMER CREATE TRANSFER
    • GLOBUS TIMER DELETE
    • GLOBUS TIMER LIST
    • GLOBUS TIMER SHOW
    • GLOBUS TRANSFER
    • GLOBUS UPDATE
    • GLOBUS VERSION
    • GLOBUS WHOAMI
  • Examples
Skip to main content
Globus Docs
  • APIs
    Auth Flows Groups Search Transfer Python SDK Helper Pages
  • How To
  • Guides
    Globus Connect Server High Assurance Collections for Protected Data Command Line Interface Premium Storage Connectors Security Modern Research Data Portal
  • Support
    FAQs Mailing Lists Contact Us Check Support Tickets
  1. Home
  2. Introduction
  3. Reference

GLOBUS TRANSFER

NAME

globus transfer - Submit a transfer task (asynchronous)

SYNOPSIS

globus transfer [OPTIONS] SOURCE_ENDPOINT_ID[:SOURCE_PATH] DEST_ENDPOINT_ID[:DEST_PATH]

DESCRIPTION

Copy a file or directory from one endpoint to another as an asynchronous task.

'globus transfer' has two modes. Single target, which transfers one file or one directory, and batch, which takes in several lines to transfer multiple files or directories. See "Batch Input" below for more information.

'globus transfer' will always place the dest files in a consistent, deterministic location. The contents of a source directory will be placed inside the dest directory. A source file will be copied to the dest file path, which must not be an existing directory. All intermediate / parent directories on the dest will be automatically created if they don’t exist.

If the files or directories given as input are symbolic links, they are followed. However, no other symbolic links are followed and no symbolic links are ever created on the dest.

Batched Input

If you use SOURCE_PATH and DEST_PATH without the --batch flag, you will submit a single-file or single-directory transfer task. This has behavior similar to cp and cp -r across endpoints.

Using --batch, globus transfer can submit a task which transfers multiple files or directories. The value for --batch can be a file to read from, or the character - which will read from stdin. From either the file or stdin, each line is treated as a path to a file or directory to transfer, respecting quotes.

Lines are of the form [--recursive] [--external-checksum TEXT] SOURCE_PATH DEST_PATH

Skips empty lines and allows comments beginning with "#".

If you use --batch and a commandline SOURCE_PATH and/or DEST_PATH, these paths will be used as dir prefixes to any paths read from the batch source.

Sync Levels

Sync Levels are ways to decide whether or not files are copied, with the following definitions:

EXISTS: Determine whether or not to transfer based on file existence. If the destination file is absent, do the transfer.

SIZE: Determine whether or not to transfer based on the size of the file. If destination file size does not match the source, do the transfer.

MTIME: Determine whether or not to transfer based on modification times. If source has a newer modififed time than the destination, do the transfer.

CHECKSUM: Determine whether or not to transfer based on checksums of file contents. If source and destination contents differ, as determined by a checksum of their contents, do the transfer.

If a transfer fails, CHECKSUM must be used to restart the transfer. All other levels can lead to data corruption.

Automatic Endpoint Activation

This command requires all endpoints it uses to be activated. It will attempt to auto-activate any endpoints that are not active, but if auto-activation fails, you will need to manually activate the endpoint. See 'globus endpoint activate' for more details.

OPTIONS

--skip-activation-check

Submit the task even if the endpoint(s) aren’t currently activated.

--deadline [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]

Set a deadline for this to be canceled if not completed by.

--label TEXT

Set a label for this task.

--submission-id TEXT

Task submission ID, as generated by globus task generate-submission-id. Used for safe resubmission in the presence of network failures.

--notify {on,off,succeeded,failed,inactive}

Comma separated list of task events which notify by email. 'on' and 'off' may be used to enable or disable notifications for all event types. Otherwise, use 'succeeded', 'failed', or 'inactive'

--dry-run

Don’t actually submit the task, print submission data instead

-s, --sync-level [exists|size|mtime|checksum]

Specify that only new or modified files should be transferred, depending on which setting is provided

--batch FILENAME

Accept a batch of source/dest path pairs from a file. Use the special - value to read from stdin; otherwise opens the file from the argument and passes through lines from that file. Uses SOURCE_ENDPOINT_ID and DEST_ENDPOINT_ID as passed on the commandline. Commandline paths are still allowed and are used as prefixes to the batchmode inputs.

-r, --recursive

SOURCE_PATH and DEST_PATH are both directories, do a recursive directory transfer

--preserve-timestamp, --preserve-mtime

Preserve file and directory modification times.

--verify-checksum / --no-verify-checksum

Verify checksum after transfer. [default: verify-checksum]

--encrypt-data, --encrypt

Encrypt data sent through the network.

--skip-source-errors

Skip over source paths that hit permission denied or file not found errors during the transfer.

--fail-on-quota-errors

Cause the task to fail if any quota exceeded errors are hit during the transfer.

--delete

Delete extraneous files in the destination directory. Only applies to recursive directory transfers.

--external-checksum TEXT

An external checksum to verify source file and data transfer integrity. Assumed to be an MD5 checksum if --checksum-algorithm is not given.

--checksum-algorithm TEXT

Specify an algorithm for --external-checksum or --verify-checksum

--exclude TEXT

Exclude files and directories found with names that match the given pattern in recursive transfers. Pattern may include * ? or [] for unix style globbing. Give this option multiple times to exclude multiple patterns.

-v, --verbose

Control level of output

-h, --help

Show this message and exit.

-F, --format [unix|json|text]

Output format for stdout. Defaults to text

--jmespath, --jq TEXT

A JMESPath expression to apply to json output. Forces the format to be json processed by this expression

--map-http-status TEXT

Map HTTP statuses to any of these exit codes: 0,1,50-99. e.g. "404=50,403=51"

EXAMPLES

Transfer a single file:

$ source_ep=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ dest_ep=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus transfer $source_ep:/share/godata/file1.txt $dest_ep:~/mynewfile.txt

Transfer a directory recursively:

$ source_ep=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ dest_ep=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus transfer $source_ep:/share/godata/ $dest_ep:~/mynewdir/ --recursive

Use the batch input method to transfer multiple files and directories:

$ source_ep=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ dest_ep=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus transfer $source_ep $dest_ep --batch -
# lines starting with '#' are comments
# and blank lines (for spacing) are allowed

# files in the batch
/share/godata/file1.txt ~/myfile1.txt
/share/godata/file2.txt ~/myfile2.txt
/share/godata/file3.txt ~/myfile3.txt
# these are recursive transfers in the batch
# you can use -r, --recursive, and put the option before or after
/share/godata ~/mygodatadir -r
--recursive godata mygodatadir2
<EOF>

Use the batch input method to transfer multiple files and directories, with a prefix on the source and destination endpoints (this is identical to the case above, but much more concise):

$ source_ep=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ dest_ep=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus transfer $source_ep:/share/ $dest_ep:~/ --batch -
godata/file1.txt myfile1.txt
godata/file2.txt myfile2.txt
godata/file3.txt myfile3.txt
godata mygodatadir -r
--recursive godata mygodatadir2
<EOF>

Consume a batch of files to transfer from a data file, submit the transfer task, get back its task ID for use in globus task wait, wait for up to 30 seconds for the task to complete, and then print a success or failure message.

$ cat my_file_batch.txt
/share/godata/file1.txt ~/myfile1.txt
/share/godata/file2.txt ~/myfile2.txt
/share/godata/file3.txt ~/myfile3.txt
source_ep=ddb59aef-6d04-11e5-ba46-22000b92c6ec
dest_ep=ddb59af0-6d04-11e5-ba46-22000b92c6ec

task_id="$(globus transfer $source_ep $dest_ep     --jmespath 'task_id' --format=UNIX     --batch my_file_batch.txt)"

echo "Waiting on 'globus transfer' task '$task_id'"
globus task wait "$task_id" --timeout 30
if [ $? -eq 0 ]; then
    echo "$task_id completed successfully";
else
    echo "$task_id failed!";
fi

EXIT STATUS

0 on success.

1 if a network or server error occurred, unless --map-http-status has been used to change exit behavior on http error codes.

2 if the command was used improperly.

3 if the command was used on the wrong type of object, e.g. a collection command used on an endpoint.

4 if the command has authentication or authorization requirements which were not met, as in ConsentRequired errors or missing logins.

  • Introduction
  • QuickStart
  • Collections vs Endpoints
  • High Assurance
  • Environment Variables
  • Reference
    • CLI Changelog
    • GLOBUS API AUTH
    • GLOBUS API FLOWS
    • GLOBUS API GROUPS
    • GLOBUS API SEARCH
    • GLOBUS API TIMER
    • GLOBUS API TRANSFER
    • GLOBUS BOOKMARK CREATE
    • GLOBUS BOOKMARK DELETE
    • GLOBUS BOOKMARK LIST
    • GLOBUS BOOKMARK RENAME
    • GLOBUS BOOKMARK SHOW
    • GLOBUS CLI-PROFILE-LIST
    • GLOBUS COLLECTION DELETE
    • GLOBUS COLLECTION LIST
    • GLOBUS COLLECTION SHOW
    • GLOBUS COLLECTION UPDATE
    • GLOBUS DELETE
    • GLOBUS ENDPOINT ACTIVATE
    • GLOBUS ENDPOINT DEACTIVATE
    • GLOBUS ENDPOINT DELETE
    • GLOBUS ENDPOINT IS-ACTIVATED
    • GLOBUS ENDPOINT LOCAL-ID
    • GLOBUS ENDPOINT MY-SHARED-ENDPOINT-LIST
    • GLOBUS ENDPOINT PERMISSION CREATE
    • GLOBUS ENDPOINT PERMISSION DELETE
    • GLOBUS ENDPOINT PERMISSION LIST
    • GLOBUS ENDPOINT PERMISSION SHOW
    • GLOBUS ENDPOINT PERMISSION UPDATE
    • GLOBUS ENDPOINT ROLE CREATE
    • GLOBUS ENDPOINT ROLE DELETE
    • GLOBUS ENDPOINT ROLE LIST
    • GLOBUS ENDPOINT ROLE SHOW
    • GLOBUS ENDPOINT SEARCH
    • GLOBUS ENDPOINT SERVER ADD
    • GLOBUS ENDPOINT SERVER DELETE
    • GLOBUS ENDPOINT SERVER LIST
    • GLOBUS ENDPOINT SERVER SHOW
    • GLOBUS ENDPOINT SERVER UPDATE
    • GLOBUS ENDPOINT SET-SUBSCRIPTION-ID
    • GLOBUS ENDPOINT SHOW
    • GLOBUS ENDPOINT STORAGE-GATEWAY LIST
    • GLOBUS ENDPOINT UPDATE
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE FROM-JSON
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE POSIX
    • GLOBUS ENDPOINT USER-CREDENTIAL CREATE S3
    • GLOBUS ENDPOINT USER-CREDENTIAL DELETE
    • GLOBUS ENDPOINT USER-CREDENTIAL LIST
    • GLOBUS ENDPOINT USER-CREDENTIAL SHOW
    • GLOBUS FLOWS DELETE
    • GLOBUS FLOWS LIST
    • GLOBUS FLOWS SHOW
    • GLOBUS FLOWS START
    • GLOBUS GCP CREATE GUEST
    • GLOBUS GCP CREATE MAPPED
    • GLOBUS GET-IDENTITIES
    • GLOBUS GROUP CREATE
    • GLOBUS GROUP DELETE
    • GLOBUS GROUP INVITE ACCEPT
    • GLOBUS GROUP INVITE DECLINE
    • GLOBUS GROUP JOIN
    • GLOBUS GROUP LEAVE
    • GLOBUS GROUP LIST
    • GLOBUS GROUP MEMBER ADD
    • GLOBUS GROUP MEMBER APPROVE
    • GLOBUS GROUP MEMBER INVITE
    • GLOBUS GROUP MEMBER LIST
    • GLOBUS GROUP MEMBER REJECT
    • GLOBUS GROUP MEMBER REMOVE
    • GLOBUS GROUP SET-POLICIES
    • GLOBUS GROUP SHOW
    • GLOBUS GROUP UPDATE
    • GLOBUS LIST-COMMANDS
    • GLOBUS LOGIN
    • GLOBUS LOGOUT
    • GLOBUS LS
    • GLOBUS MKDIR
    • GLOBUS RENAME
    • GLOBUS RM
    • GLOBUS SEARCH DELETE-BY-QUERY
    • GLOBUS SEARCH INDEX CREATE
    • GLOBUS SEARCH INDEX DELETE
    • GLOBUS SEARCH INDEX LIST
    • GLOBUS SEARCH INDEX ROLE CREATE
    • GLOBUS SEARCH INDEX ROLE DELETE
    • GLOBUS SEARCH INDEX ROLE LIST
    • GLOBUS SEARCH INDEX SHOW
    • GLOBUS SEARCH INGEST
    • GLOBUS SEARCH QUERY
    • GLOBUS SEARCH SUBJECT DELETE
    • GLOBUS SEARCH SUBJECT SHOW
    • GLOBUS SEARCH TASK LIST
    • GLOBUS SEARCH TASK SHOW
    • GLOBUS SESSION CONSENT
    • GLOBUS SESSION SHOW
    • GLOBUS SESSION UPDATE
    • GLOBUS TASK CANCEL
    • GLOBUS TASK EVENT-LIST
    • GLOBUS TASK GENERATE-SUBMISSION-ID
    • GLOBUS TASK LIST
    • GLOBUS TASK PAUSE-INFO
    • GLOBUS TASK SHOW
    • GLOBUS TASK UPDATE
    • GLOBUS TASK WAIT
    • GLOBUS TIMER CREATE TRANSFER
    • GLOBUS TIMER DELETE
    • GLOBUS TIMER LIST
    • GLOBUS TIMER SHOW
    • GLOBUS TRANSFER
    • GLOBUS UPDATE
    • GLOBUS VERSION
    • GLOBUS WHOAMI
  • Examples
© 2010- The University of Chicago Legal Privacy Accessibility