Posted in Linux/Unix/BSD -
I very occasionally need to support people with websites on servers other than those I manage. If the server is only accessible using FTP and I need to get a copy of the entire website, then I use the ncftpget command line tool to recursively download all the files and directories in one go.
ncftpget is part of the ncftp package.
On APT based Linux distros (e.g. Debian) you can install it like this:
apt-get install ncftp
On YUM based Linux distros (e.g. CentOS, RHEL) you can install it like this:
yum install ncftp
Use the command like so:
ncftpget -R -T -v -u [username] [hostname] [local path] [remote path]
-R tells ncftpget to download files and directories recursively
-T says not to try a tar download (it's never worked for me and results in the error "tar: This does not look like a tar archive" and "tar: Exiting with failure status due to previous errors". The actual files subsequently download just fine).
-v says to be verbose and show the download progress; you can omit this but it can be useful to see what's going on
-u specifies the username to use. Change [username] to the user to log in as
Replace [hostname] with the server to ftp to.
Replace [local path] to where you want to copy the files to.
Replace [remote path] to the path where the files are on the server you are connecting to.
Let's say our username is "chris", the server is 10.1.1.10, the path we want to save to locally is /tmp and we want to download files from the remote host from /httpdocs. Do this:
ncftpget -R -T -v -u chris 10.1.1.10 /tmp /httpdocs
You are then prompted for the password and the download starts.
제목 | 날짜 | ||
---|---|---|---|
563 | [메뉴얼] 전자책, ebook 형태 게시판 만들기 (퍼옴) | 200 | 2017/09/25 |
562 | [윈도우] 윈도우 데스크톱 200% 활용하기: 무료 툴 Top 25 | 200 | 2020/07/29 |
561 | [가상윈도우] Nginx 서브디렉토리 index 파일을 못 가져와요. | 206 | 2017/06/25 |
560 | [브라우저] [파이어폭스] jjDicTrans : 간단한 영한사전+번역 | 208 | 2015/08/12 |
559 | 클라우드플레어와 HTTPS 적용 | 210 | 2017/08/17 |
558 | [Apm] 오토셋에서 mysql 명령어 입력하기 | 212 | 2018/12/10 |
557 | [아임웹] 아임웹 - 모바일 메뉴 하단에 SNS 아이콘 추가하는 코드 | 224 | 2024/03/15 |
556 | [리눅스서버] HTTP 웹 성능 개선하기 | 228 | 2020/07/02 |
555 | [Nginx] NGINX PHP 파일 업로드 용량 | 230 | 2018/12/16 |
554 | nginx https redirect www to non-www | 231 | 2018/04/04 |
553 | [리눅스서버] Got a packet bigger than 'max_allowed_packet' bytes 문제 | 237 | 2017/05/05 |
552 | [리눅스서버] upstream 500 에러 / 오류 잡기 / socket 제한 | 251 | 2017/04/18 |