<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.snu.edu.in/index.php?action=history&amp;feed=atom&amp;title=Magus02%2FFile_Transfer</id>
	<title>Magus02/File Transfer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.snu.edu.in/index.php?action=history&amp;feed=atom&amp;title=Magus02%2FFile_Transfer"/>
	<link rel="alternate" type="text/html" href="https://wiki.snu.edu.in/index.php?title=Magus02/File_Transfer&amp;action=history"/>
	<updated>2026-11-04T19:44:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://wiki.snu.edu.in/index.php?title=Magus02/File_Transfer&amp;diff=1181&amp;oldid=prev</id>
		<title>Deepak: new</title>
		<link rel="alternate" type="text/html" href="https://wiki.snu.edu.in/index.php?title=Magus02/File_Transfer&amp;diff=1181&amp;oldid=prev"/>
		<updated>2026-04-20T06:36:03Z</updated>

		<summary type="html">&lt;p&gt;new&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:File Transfer — Magus02 HPC}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#0d1b2a;border:1px solid #1e3a5a;border-radius:8px;padding:12px 18px;margin-bottom:20px;font-size:13px;font-family:monospace;color:#5ba3d9;&amp;quot;&amp;gt;&lt;br /&gt;
📍 [[Magus02/Knowledge_Base|Magus02 Knowledge Base]] → Basics → File Transfer&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run jobs on Magus02, your input data and scripts must reside on the cluster's filesystem. This page covers all methods for moving files between your local machine and Magus02.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Choosing a Transfer Method ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method !! Best For !! Platform&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; || Quick transfer of one or a few files || Linux / macOS / Windows 10+&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rsync&amp;lt;/code&amp;gt; || Syncing large directories efficiently || Linux / macOS&lt;br /&gt;
|-&lt;br /&gt;
| WinSCP || Graphical file manager for Windows || Windows&lt;br /&gt;
|-&lt;br /&gt;
| FileZilla || Cross-platform graphical FTP/SFTP client || Windows / macOS / Linux&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#0d1a2a;border-left:4px solid #00c9ff;border-radius:6px;padding:14px 18px;margin:16px 0;font-size:14px;color:#94a8be;&amp;quot;&amp;gt;&lt;br /&gt;
💡 &amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rsync&amp;lt;/code&amp;gt; build on SSH. Ensure your SSH access is working first (see [[Magus02/SSH|SSH Access]]). If you load modules in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; that produce output, &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt; may fail — see the troubleshooting note below.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== scp — Secure Copy ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; is the simplest method for transferring individual files. It works wherever SSH works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Upload a local file to your home directory on Magus02:&lt;br /&gt;
$ scp myinput.dat your_username@magus02.snu.edu.in:~/&lt;br /&gt;
&lt;br /&gt;
# Upload to a specific remote path:&lt;br /&gt;
$ scp myinput.dat your_username@magus02.snu.edu.in:/scratch/myuser/project/&lt;br /&gt;
&lt;br /&gt;
# Download a file from Magus02 to your local machine:&lt;br /&gt;
$ scp your_username@magus02.snu.edu.in:~/results/output.log ./&lt;br /&gt;
&lt;br /&gt;
# Upload an entire directory (recursive):&lt;br /&gt;
$ scp -r myproject/ your_username@magus02.snu.edu.in:~/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting scp / sftp failures ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; fails silently or graphical clients like FileZilla show no files, the cause is often '''output generated during login''' (e.g. from &amp;lt;code&amp;gt;module load&amp;lt;/code&amp;gt; commands in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;). Fix it by adding this guard to your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Only run interactive-session commands when shell is interactive:&lt;br /&gt;
[ -z &amp;quot;$PS1&amp;quot; ] &amp;amp;&amp;amp; return&lt;br /&gt;
# --- put all your 'module load ...' commands AFTER this line ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== rsync — Directory Synchronisation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;rsync&amp;lt;/code&amp;gt; is more powerful than &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;: it only transfers the '''differences''' between source and destination, making it far more efficient for large directories or repeated transfers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# General syntax:&lt;br /&gt;
$ rsync [options] [source] [destination]&lt;br /&gt;
&lt;br /&gt;
# Sync a local directory to Magus02 (compressed, verbose, human-readable):&lt;br /&gt;
$ rsync -azvh -e ssh myproject/ your_username@magus02.snu.edu.in:/scratch/myuser/project/&lt;br /&gt;
&lt;br /&gt;
# Sync results back from Magus02 to your local machine:&lt;br /&gt;
$ rsync -azvh -e ssh your_username@magus02.snu.edu.in:/scratch/myuser/project/results/ ./results/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common options:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt; || Archive mode: preserves timestamps, permissions, symlinks, and recurses into subdirectories&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-z&amp;lt;/code&amp;gt; || Compress data during transfer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-v&amp;lt;/code&amp;gt; || Verbose output — show files being transferred&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-h&amp;lt;/code&amp;gt; || Human-readable sizes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-n&amp;lt;/code&amp;gt; || Dry run — show what would be transferred without actually doing it&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--delete&amp;lt;/code&amp;gt; || Delete files at the destination that no longer exist at the source&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== WinSCP — Graphical Client (Windows) ==&lt;br /&gt;
&lt;br /&gt;
WinSCP provides a drag-and-drop file manager for Windows users.&lt;br /&gt;
&lt;br /&gt;
; Step 1 — Open WinSCP and configure the session:&lt;br /&gt;
: Set '''File protocol''' to SFTP, '''Host name''' to &amp;lt;code&amp;gt;magus02.snu.edu.in&amp;lt;/code&amp;gt;, '''Port''' to &amp;lt;code&amp;gt;22&amp;lt;/code&amp;gt;, and enter your username and password. Click '''Login'''.&lt;br /&gt;
&lt;br /&gt;
; Step 2 — Accept the host key:&lt;br /&gt;
: On first connection, click '''Yes''' to trust the host fingerprint.&lt;br /&gt;
&lt;br /&gt;
; Step 3 — Transfer files:&lt;br /&gt;
: Your local files appear on the left panel, Magus02 files on the right. Drag and drop, or right-click to upload/download.&lt;br /&gt;
&lt;br /&gt;
Download WinSCP: [https://winscp.net winscp.net]&lt;br /&gt;
&lt;br /&gt;
== FileZilla — Cross-Platform Graphical Client ==&lt;br /&gt;
&lt;br /&gt;
FileZilla works on Windows, macOS, and Linux. Connect using SFTP:&lt;br /&gt;
&lt;br /&gt;
* '''Host:''' &amp;lt;code&amp;gt;sftp://magus02.snu.edu.in&amp;lt;/code&amp;gt;&lt;br /&gt;
* '''Port:''' &amp;lt;code&amp;gt;22&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enter your username and password, then click '''Quickconnect'''.&lt;br /&gt;
&lt;br /&gt;
Your local files appear in the left panel; remote cluster files appear in the right panel.&lt;br /&gt;
&lt;br /&gt;
Download FileZilla: [https://filezilla-project.org filezilla-project.org]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.hypexr.org/linux_scp_help.php SCP usage examples]&lt;br /&gt;
* [http://www.createdbypete.com/articles/a-practical-guide-to-using-rsync Basic rsync guide]&lt;br /&gt;
* [[Magus02/SSH|SSH Access Guide]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-family:monospace;font-size:11px;color:#484f58;text-align:right;&amp;quot;&amp;gt;&lt;br /&gt;
[[Magus02/Knowledge_Base|↑ Back to Knowledge Base]] · Maintained by HPC Administration · wiki.snu.edu.in&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deepak</name></author>
	</entry>
</feed>