Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:services:application_services:high_performance_computing:transfer_data [2015/09/10 18:42]
rgroh [Getting Access to Scratch from Outside the GÖNET]
en:services:application_services:high_performance_computing:transfer_data [2019/01/10 11:20]
tehlers [Getting Access to Scratch from Outside the GÖNET (ssh proxy method)]
Line 1: Line 1:
 +====== Transfer Data ======
 +
 +One often wants to copy data to or from the Scientific Compute Cluster. In this article we show options to copy from inside or outside of GÖNET, the network of the University of Göttingen and Max Planck institutes in Göttingen.
 +
 +The transfernodes are ''​transfer-scc.gwdg.de''​ (reachable inside the GÖNET) and ''​transfer.gwdg.de''​ (world accessible). ​
 +
 +''​transfer-scc.gwdg.de''​ has homes and /scratch.
 +
 +''​transfer.gwdg.de''​ has only homes. /scratch is reachable with ssh port-forward to transfer-scc;​ see below.
 +
 +For the filesystem /scratch2 we don't have a dedicated transfernode. For this filesystem you need to use the frontend ''​gwdu103.gwdg.de''​ (instead of ''​transfer-scc.gwdg.de''​).
 +=====  Within the GÖNET ​ =====
 +
 +If your computer is located //inside the GÖNET//, you can use ''​transfer-scc.gwdg.de''​ to copy data from and to:
 +
 +**your Home directory**
 +
 +**/​scratch**
 +
 +using ssh (scp or rsync tunneled through ssh). Here is an example for copying data from your computer to scratch (please replace {SRC-DIR},​{DST-DIR} and {USERID}):
 +<​code>​
 +scp -rp {SRC-DIR} {USERID}@transfer-scc.gwdg.de:/​scratch/​{USERID}/​{DST-DIR}
 +</​code>​
 +\\
 +or
 +<​code>​
 +rsync -avvH {SRC-DIR} {USERID}@transfer-scc.gwdg.de:/​scratch/​{USERID}/​{DST-DIR}
 +</​code>​
 +\\
 +In order to transfer files from scratch back to your computer you swap the arguments of the commands:
 +
 +<​code>​
 +scp -rp {USERID}@transfer-scc.gwdg.de:/​scratch/​{USERID}/​{SRC-DIR} {DST-DIR}
 +</​code>​
 +\\
 +or
 +<​code>​
 +rsync -avvH {USERID}@transfer-scc.gwdg.de:/​scratch/​{USERID}/​{SRC-DIR} {DST-DIR}
 +</​code>​
 +\\
 +=====  Outside of the GÖNET (from the Internet) ​ =====
 +
 +If your computer is located //outside the GÖNET//, you can use the server ''​transfer-scc.gwdg.de''​ to copy data from and to:
 +
 +**your Home directory**
 +
 +Just change ''​transfer-scc''​ to ''​transfer''​ in the commands above.
 +
 +For security reasons this node is not located inside the SCC network and therefor only has your Home directory but not /scratch accessible.
 +
 +====  Getting Access to Scratch from Outside the GÖNET ​ (ssh proxy method)====
 +
 +If you want to copy data to scratch, you need to "​hop"​ over transfer.gwdg.de to ''​transfer-scc.gwdg.de''​. This is not necessary for the transfer from and to your home directory (see above)! The easiest way is to create a section in your ssh config ''​~/​.ssh/​config''​ on your local system (don't forget to substitute your GWDG-UserID):​
 +
 +<​code>​
 +Host transfer-scc.gwdg.de
 +        User {USERID}
 +        Hostname transfer-scc.gwdg.de
 +        ProxyCommand ssh -W %h:%p {USERID}@transfer.gwdg.de
 +</​code>​
 +\\
 +This configures ssh to reach ''​transfer-scc.gwdg.de''​ not directly, but via ''​transfer.gwdg.de''​. An ''​ssh transfer-scc.gwdg.de''​ or ''​scp''​ or ''​rsync''​ will now tunnel through ''​transfer.gwdg.de''​.
 +
 +====  Getting Access to Scratch from Outside the GÖNET ​ (port tunnel method)====
 +
 +If you want to copy data to scratch, you need to open an ssh-tunnel (port-forwarding). This is not necessary for the transfer from and to your home directory! The way it works is that you first open a tunnel from ''​transfer-scc.gwdg.de''​ to your local computer on port 4022 via the ''​transfer.gwdg.de''​ node:
 +
 +<​code>​
 +ssh {USERID}@transfer.gwdg.de -N -L 4022:​transfer-scc.gwdg.de:​22
 +</​code>​
 +\\
 +You can now use your local port 4022 to directly connect to the ssh-Port of ''​transfer-scc.gwdg.de''​.
 +
 +Now you need another local terminal where you utilize the tunneled port for data transfer. For copying data from your computer to the scratch folder you can use:
 +
 +<​code>​
 +scp -rp -P 4022 {SRC-DIR} {USERID}@localhost:/​scratch/​{USERID}/​{DST-DIR}
 +</​code>​
 +\\
 +or
 +<​code>​
 +rsync -avvH --rsh='​ssh -p 4022' {SRC-DIR} {USERID}@localhost:/​scratch/​{USERID}/​{DST-DIR}
 +</​code>​
 +\\
 +
 +and for the backwards direction from scratch to your computer:
 +
 +<​code>​
 +scp -rp -P 4022 {USERID}@localhost:/​scratch/​{USERID}/​{SRC-DIR} {DST-DIR}
 +</​code>​
 +\\
 +or
 +<​code>​
 +rsync -avvH --rsh='​ssh -p 4022' {USERID}@localhost:/​scratch/​{USERID}/​{SRC-DIR} {DST-DIR}
 +</​code>​
 +\\
 +(Please notice the upper case "​P"​ in the scp command but the lower case "​p"​ in the case auf rsync)
 +
 +
 +After finishing your file transfers your should close the ssh tunnel command with <​Ctrl>​+c.
 +
 +=====  Troubleshooting ​ =====
 +
 +To test if your tunnel is working, you can connect with telnet to you local port 4022:
 +
 +<​code>​
 +~ > telnet localhost 4022
 +Trying 127.0.0.1...
 +Connected to localhost.
 +Escape character is '​^]'​.
 +SSH-2.0-OpenSSH_5.3
 +</​code>​
 +\\
 +If your local port 4022 is already used, you can use any port above 1024 and below 32768, just change it in all commands.
 +
 +[[Kategorie:​ Scientific Computing]]