Transferring Data with GridFTP
Categories: Data Management, Data Transfer
Installing GridFTP
Prior to using GridFTP, it must be installed on both the client and server. Installation is independent of the authentication method chosen. GridFTP is currently available on each OLCF system and can be added to your environment using the globus module:
module load globus
If your site does not already have GridFTP available, it can be downloaded from Globus. Download and installation information can be found on the Globus Toolkit Documentation site.
Configuring GridFTP
SSH Authentication
No setup is required if you will be using SSH for authentication.
DOEGrid Certificate Authentication
If you are using a DOEGrid Certificate, you will need to follow the steps below:
Obtain a DOEGrid Certificate – Before using GridFTP each user must have a DOEGrid Certificate. The basic steps are listed below. Details may be found on the DOEGrid site.
- Import DOEGrid Chain of Certificate Authorities
- Request DOEGrid Certificate
- Import DOEGrid Certificate
- Export/Extract DOEGrid Certificate
- Ensure appropriate permissions are set on usercert.pem and userkey.pem
chmod 644 $HOME/.globus/usercert.pem
chmod 600 $HOME/.globus/userkey.pem
Register the DOEGrid Certificate – Before using your DOEGrid Certificate on OLCF systems you must register your certificate with the OLCF. Once your DOEGrid Certificate has been extracted to $HOME/.globus/usercert.pem
and $HOME/.globus/userkey.pem
run the following:
$ module load globus $ register_globus_creds
You will receive an email once your certificate has been successfully registered.
Transferring Data with GridFTP
Files are transferred using the globus-url-copy
command. The arguments to that command will differ based on your authentication method. If you have not done so already, load the globus module:
module load globus
SSH Authentication
For SSH authentication, simply run the globus-url-copy
command.
For example, while on an OLCF resource, you can transfer file1
in your OLCF User Work area to file2
on a remote system:
globus-url-copy -tcp-bs 12M -bs 12M -p 4 -v -vb file:/tmp/work/$USER/file1 sshftp://user@remote.system/remote/dir/file2
From the OLCF, transfer file1
on a remote system to file2
in your User Work area:
globus-url-copy -tcp-bs 12M -bs 12M -p 4 -v -vb sshftp://remote.system/remote/dir/file1 file:/tmp/work/$USER/file2
From remote system, transfer file1
on a remote system to file2
in your User Work area:
globus-url-copy -tcp-bs 12M -bs 12M -p 4 -v -vb file:/remote/dir/file1 sshftp://userid@dtn01.ccs.ornl.gov/tmp/work/$USER/file2
DOEGrid Certificate Authentication
When using DOEGrid Authentication, you must first generate a proxy certificate. Your DOEGrid Certificate must be registered for this to work. Run the command:
myproxy-init -n
To generate a new certificate, then to login, run:
myproxy-logon
Enter MyProxy pass phrase:
prompt.
Once you have generated the certificate, you can transfer files with globus-url-copy
. For example, if you are connected to an OLCF system and want to transfer file1
in your OLCF User Home area to file2
on a remote system, use:
globus-url-copy -tcp-bs 12M -bs 12M -p 4 gsiftp://dtn01.ccs.ornl.gov/$HOME/file1 gsiftp://remote.sys//tmp/shared/$USER/file2