Downloading all files from an FTP Server [closed] Downloading all files from an FTP Server [closed] linux linux

Downloading all files from an FTP Server [closed]


Use wget in this manner (m for mirroring):

wget -m ftp://username:password@ip.of.old.host

If your username or password contains special characters, you may need to use the format:

wget -m --user=username --password=password ftp://ip.of.old.host

Alternatively, I found this guide which shows you how to do it using ncftp in Debian. You will require root access to the new server if ncftp is not installed already.

In short:

sudo apt-get install ncftpncftpget –T –R –v –u "ftpuser" ftp.nixcraft.net /home/vivek/backup /www-data


Another way is to use ftp. Here's an example shell script using ftp:

#! /bin/bashftp -n << 'EOF'open ftp.your_ftp_host.comquote USER your_username_herequote PASS your_password_herecd getsprompt nomget * .byeEOF


Some FTP servers allow to download whole directories by suffixing their name with .tar or .tgz. The server then creates an archive of that directory.