6. Data transfer examples

These examples assume that you’re running mdtmFTP client and server on a host OS, and not within a container.

6.1. Client – Server data transfer (IPv4)

Step 1, launch the server on host A. Use the command line:

[user@dtn-a.example.net dir]$ sudo mdtm-ftp-server \
  -data-interface 10.40.130.189 \
  -password-file pwfile -p 5001 -c server.conf

Step 2, launch the client on host B, using one of the following commands.

6.1.1. Authentication method: username and password

In the below examples, we assume the username mdtmftp and password 123456.

  • Single file data transfer. Transfer a single file from host A to host B:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
      ftp://mdtmftp:123456@dtn-a.example.net:5001/storage/data1/testfiles/100G/file1 \
      file:///storage/data1/tmp/
    
  • Single file data transfer. Transfer a single file from host B to host A:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       file:///storage/data1/tmp/file1 \
       ftp://mdtmftp:123456@dtn-a.example.net:5001/storage/data1/tmp/
    
  • Folder data transfer. Transfer a Linux folder from host A to host B:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       ftp://mdtmftp:123456@dtn-b.example.net:5001/storage/data1/linux-3.18.21/ \
       file:///storage/data1/tmp
    
  • Folder data transfer. Transfer a Linux folder from host B to host A:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       file:///storage/data1/tmp/linux-3.18.21/ \
       ftp://mdtmftp:123456@dtn-a.example.net:5001/storage/data1/tmp/
    

6.1.2. Authentication method: GSI certificate

  • Single file data transfer. Transfer a single file from host A to host B:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       gsiftp://dtn-a.example.net:5001/storage/data1/testfiles/100G/file1 \
       file:///storage/data1/tmp/
    
  • Single file data transfer. Transfer a single file from host B to host A:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       file:///storage/data1/tmp/file1 \
       gsiftp://dtn-a.example.net:5001/storage/data1/tmp/
    
  • Folder data transfer. Transfer a Linux folder from host A to host B:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       gsiftp://dtn-a.example.net:5001/storage/data1/linux-3.18.21/ \
       file:///storage/data1/tmp/
    
  • Folder data transfer. Transfer a Linux folder from host B to host A:

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -p 8 \
       file:///storage/data1/tmp/linux-3.18.21/ \
       gsiftp://dtn-a.example.net:5001/storage/data1/tmp/
    

6.2. Third party data transfer between two remote HOSTs (IPv4)

Step 1, launch mdtmFTP server on remote host A:

[user@dtn-a.example.net dir]$ mdtm-ftp-server \
   -data-interface 131.225.2.29 \
   -password-file pwfile \
   -p 5001 \
   -c server.conf

Step 2, launch mdtmFTP server on remote host B:

[user@dtn-b.example.net dir]$ mdtm-ftp-server \
   -data-interface 131.225.2.31 \
   -password-file pwfile \
   -p 5001 \
   -c server.conf

Step 3, launch the client on local host C, using one of the following commands.

6.2.1. Authentication method: user/password

Once again, for these examples, we are assuming the username mdtmftp, and password 123456.

  • Single file data transfer. Transfer a single file from host A to host B:

    [user@local.example.net dir]$ mdtm-ftp-client -p 8 -vb \
       ftp://mdtmftp:123456@131.225.2.29:5001/storage/data1/testfiles/100G/file1 \
       ftp://mdtmftp:123456@131.225.2.31:5001/storage/data1/tmp/
    
  • Folder data transfer. Transfer a Linux folder from host A to host B:

    [user@local.example.net dir]$ mdtm-ftp-client -p 8 –vb \
       ftp://mdtmftp:123456@131.225.2.29:5001/storage/data1/linux-3.18.21/ \
       ftp://mdtmftp:123456@131.225.2.31:5001/storage/data1/tmp/
    

6.2.2. Authentication method: GSI certificate

  • Single file data transfer. Transfer a single file from host A to host B:

    [user@local.example.net dir]$ mdtm-ftp-client -p 8 -vb \
       gsiftp://131.225.2.29:5001/storage/data1/testfiles/100G/file1 \
       gsiftp://131.225.2.31:5001/storage/data1/tmp/
    
  • Folder data transfer. Transfer a Linux folder from host A to host B:

    [user@local.example.net dir]$ mdtm-ftp-client -p 8 –vb \
       gsiftp://131.225.2.29:5001/storage/data1/linux-3.18.21/ \
       gsiftp://131.225.2.31:5001/storage/data1/tmp/
    

6.3. Client – Server data transfer (IPv6)

Step 1: Launch the server on host A:

[user@dtn-a.example.net dir]$ mdtm-ftp-server \
   -control-interface 2620:6a:0:2::2:48 \
   -password-file passfile -p 5050 \
   -c server.conf -l mdtmftp.log -log-level all

Step 2: Launch the client on host B:

  • Single file data transfer: transfer a single file from host A to host B.

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -ipv6 -vb -p 16 \
       ftp://mdtmftp:123456@dtn-a.example.net:5050//data1/10G.bin \
       file:///dev/null
    
  • Single file data transfer: transfer a single file from host B to host A.

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -ipv6  -vb -p 16 \
       file:///tmp/10G.bin \
       ftp://mdtmftp:123456@dtn-a.example.net:5050//data1/
    
  • Folder data transfer: transfer a Linux folder from host A to host B.

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -ipv6  -vb -p 16 \
      ftp://liangz:123456@dtn-a.example.net:5050//data1/linux-3.18.17/ \
      file:///tmp/
    
  • Folder data transfer: transfer a Linux folder from host B to host A.

    [user@dtn-b.example.net dir]$ mdtm-ftp-client -ipv6  -vb -p 16 \
       file:///tmp/linux-3.18.17/ \
       ftp://liangz:123456@dtn-a.example.net:5050//data1/
    

6.4. Third party data transfer between two remote hosts (IPv6)

Step 1: Launch mdtmFTP server on remote host A.

[user@dtn-a.example.net dir]$ mdtm-ftp-server \
   -data-interface 2620:6a:0:2::2:48 \
   -password-file passfile \
   -p 5050 -c server.conf -l mdtmftp.log -log-level all

Step 2: Launch mdtmFTP server on remote host B.

[user@dtn-b.example.net dir]$ mdtm-ftp-server \
   -data-interface 2620:6a:0:2::2:49 \
   -password-file passfile \
   -p 5050 -c server.conf -l mdtmftp.log -log-level all

Step 3: Launch the client on local host C.

[user@local.example.net dir]$ mdtm-ftp-client -ipv6 -vb -p 16 \
   ftp://mdtmftp:123456@dtn-a.example.net:5050//data1/10G.bin \
   ftp://mdtmftp:123456@dtn-b.example.net:5050/dev/null