How to connect a FTP server to transfer files from ONTAP
Applies to
- ONTAP 9
- File Transfer Protocol (FTP)
- System Shell access
Answer
To use FTP for transferring files from NetApp ONTAP, follow these steps:
-
Access System Shell:
- Unlock the
diag useraccount if necessary. - Refer to the KB article on unlocking the
diag useraccount: How to unlock Systemshell diag user account
- Unlock the
-
Navigate to the desired directory:
- Use the
cdcommand to change to the directory where you want to transfer files. - Example:
- Use the
ontap914-01% cd /clus/svm1_ontap914/vol1_svm1
ontap914-01% pwd
/clus/svm1_ontap914/vol1_svm1
-
Connect to the FTP server:
- Use the
ftpcommand to connect to the FTP server. - Example:
ontap914-01% sudo ftp 10.128.242.26 Connected to 10.128.242.26. 220 Microsoft FTP Service Name (10.128.242.26:diag): username 331 Password required Password: 230 User logged in. Remote system type is Windows_NT.
- Use the
-
FTP commands:
-
Use the following FTP commands to manage files:
ls: List files in the current directory.cd [directory]: Change directory.get [filename]: Download a file from the FTP server.put [filename]: Upload a file to the FTP server.byeorquit: Exit the FTP session.
-
Example of downloading a file:
-
ftp> get web.config
local: web.config remote: web.config
229 Entering Extended Passive Mode (|||53566|)
125 Data connection already open; Transfer starting.
100% |*******************************************************| 168 3.33 MiB/s 00:00 ETA 226 Transfer complete.
168 bytes received in 00:00 (2.73 KiB/s)
Note:
- ONTAP connects to FTP for the purpose of upgrading ONTAP or firmware.
- Since file transfers via FTP may pose security risks, if you simply wish to move files, we recommend considering the use of protocols supported by ONTAP (such as CIFS, NFS, or SAN).
Additional Information
additionalInformation_text
