Using globus-cli Command Line Tool¶
The globus-cli software is installed on PACE clusters. For full documentation, or to install it on a different system, visit the Globus CLI QuickStart Guide.
Globus's command line interface can be used as a substitute for using Globus via the standard web interface. It is distinct from setting up a personal endpoint on a computer for file transfer.
From a PACE node, load the software with
module load globus-cli. Once loaded, you can use
globus -hprovides help information and a list of available commands.
- First, authenticate with
globus loginand the link it provides. Pasting this link in your web browser will allow you to connect with your GT identity just as you would for transfer via the web interface.
- You can confirm your identity with
To prepare for a transfer, find the endpoints you wish to use with
globus endpoint search.
globus endpoint search PACEwill return all PACE endpoints, but several have duplicate names that don't work. Please use the endpoint IDs listed here:
- For Phoenix, use endpoint ID 6df312ab-ad7c-4bbc-9369-450c82f0cb92.
- For Hive, use endpoint ID 9ccb4625-1131-4f21-b73b-42c850f9d6b1.
- For Phoenix transfers over the GT Vapor network only, use endpoint ID 06c92364-7cd1-4224-a2a5-d87db3b40ad9.
- You will need to authenticate to each endpoint (even if you are logged in already). You can initiate this by doing
globus ls <endpointID>to list the files on that endpoint. This will provide another command to run, which in turn produces a URL. At that URL, choose the appropriate identity for that endpoint (for a PACE endpoint, this is your @gatech.edu identity). Copy the resulting code back into the command line.
[mweiner3@login-phoenix-3 ~]$ globus ls 9ccb4625-1131-4f21-b73b-42c850f9d6b1 The collection you are trying to access data on requires you to grant consent for the Globus CLI to access it. message: Missing required data_access consent Please run globus session consent 'urn:globus:auth:scope:transfer.api.globus.org:all[*https://auth.globus.org/scopes/9ccb4625-1131-4f21-b73b-42c850f9d6b1/data_access]' to login with the required scopes [mweiner3@login-phoenix-3 ~]$ globus session consent 'urn:globus:auth:scope:transfer.api.globus.org:all[*https://auth.globus.org/scopes/9ccb4625-1131-4f21-b73b-42c850f9d6b1/data_access]' Please authenticate with Globus here: ------------------------------------ https://auth.globus.org/v2/oauth2/authorize?client_id=59cea9d7-ccff-4bd5-89ce-603295e8d4ed&redirect_uri=https%3A%2F%2Fauth.globus.org%2Fv2%2Fweb%2Fauth-code&scope=urn%3Aglobus%3Aauth%3Ascope%3Atransfer.api.globus.org%3Aall%5B%2Ahttps%3A%2F%2Fauth.globus.org%2Fscopes%2F9ccb4625-1131-4f21-b73b-42c850f9d6b1%2Fdata_access%5D&state=_default&response_type=code&access_type=offline&prompt=login ------------------------------------ Enter the resulting Authorization Code here: *** You have successfully updated your CLI session. [mweiner3@login-phoenix-3 ~]$ globus ls 9ccb4625-1131-4f21-b73b-42c850f9d6b1 <file list>
- You can also search for and authenticate to other endpoints, such as personal endpoints or those at other computing centers, following the same method. To prepare for a transfer, authenticate to both endpoints.
- For ease of use, you may want to store the endpoint IDs in local shell variables. For example, if you plan to use Hive as the source, you could run
$SORin future commands in the same session, such as
globus ls $SOR. You could save the destination endpoint in
globus ls $SORwould then show the contents of the source endpoint you set up. You can go deeper in the directory tree with a colon:
globus ls $SOR:~/scratchlists the contents of your scratch directory, where
~represents your home directory.
- Transfer with
globus transferand the source and destination, specifying a file name at both source and destination. To transfer a directory, add the
--recursiveflag to your command and specify directory names at each end.
[mweiner3@login-phoenix-3 ~]$ globus transfer $SOR:~/scratch/htest $DES:~/scratch/htestlanding Message: The transfer has been accepted and a task has been created and queued for execution Task ID: 4284ceac-1beb-11ec-a47a-a50ad076c282
- As with the web interface, you will receive an email when the transfer is complete.
- For more features, visit Globus CLI examples.